diff options
| author | Alex Flint <[email protected]> | 2015-10-31 18:32:43 -0700 |
|---|---|---|
| committer | Alex Flint <[email protected]> | 2015-10-31 18:32:43 -0700 |
| commit | 7e1437715baf10561c97609628b8f4136a47dd67 (patch) | |
| tree | 2703010d597f623bbe05fd1fb29be944f2e02764 /example/example.go | |
| parent | 76293a5a725eb962839b8c69a2bda1296e1fdbdf (diff) | |
add example.go
Diffstat (limited to 'example/example.go')
| -rw-r--r-- | example/example.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/example/example.go b/example/example.go new file mode 100644 index 0000000..20efeec --- /dev/null +++ b/example/example.go @@ -0,0 +1,14 @@ +package main + +import "github.com/alexflint/go-arg" + +func main() { + var args struct { + Input string `arg:"positional"` + Output string `arg:"positional"` + Foo string `arg:"help:this argument is foo"` + VeryLongArgument int `arg:"help:this argument is very long"` + Bar float64 `arg:"-b"` + } + arg.MustParse(&args) +} |
