diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1,5 +1,9 @@ +[](https://godoc.org/github.com/alexflint/go-arg) + ## Structured argument parsing for Go +Declare the command line arguments your program accepts by defining a struct. + ```go var args struct { Foo string @@ -43,8 +47,8 @@ var args struct { Output []string `arg:"positional"` } arg.MustParse(&args) -fmt.Println("Input:", input) -fmt.Println("Output:", output) +fmt.Println("Input:", args.Input) +fmt.Println("Output:", args.Output) ``` ``` @@ -102,6 +106,10 @@ Fetching the following IDs from foo: [1 2 3] go get github.com/alexflint/go-arg ``` +### Documentation + +https://godoc.org/github.com/alexflint/go-arg + ### Rationale There are many command line argument parsing libraries for Go, including one in the standard library, so why build another? |
