Skip to content
This repository was archived by the owner on Feb 11, 2021. It is now read-only.

Commit 7ad6ef4

Browse files
committed
feat: update output to verbose new standard
1 parent 7e311d1 commit 7ad6ef4

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

main.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@ import (
66
)
77

88
func main() {
9+
// このコードは引数と標準出力を用いたサンプルコードです。
10+
// このコードは好きなように編集・削除してもらって構いません。
11+
// ---
12+
// This is a sample code to use arguments and outputs.
13+
// Edit and remove this code as you like.
14+
915
run(os.Args[1:])
1016
}
1117

1218
func run(args []string) {
13-
for _, v := range args {
14-
fmt.Println(v)
19+
for i, v := range args {
20+
fmt.Printf("argv[%d]: %s\n", i, v)
1521
}
1622
}

test/cases.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{ "it": "hoge ->-> hoge",
3-
"input": ["hoge"], "output": ["hoge"]},
3+
"input": ["hoge"], "output": ["argv[0]: hoge"]},
44
{ "it": "hoge, fuga ->-> hoge, fuga",
5-
"input": ["hoge", "fuga"], "output": ["hoge", "fuga"]},
5+
"input": ["hoge", "fuga"], "output": ["argv[0]: hoge", "argv[1]: fuga"]},
66
{ "it": "hoge fuga ->-> hoge fuga",
7-
"input": ["hoge fuga"], "output": ["hoge fuga"]}
7+
"input": ["hoge fuga"], "output": ["argv[0]: hoge fuga"]}
88
]

0 commit comments

Comments
 (0)