From 7e1437715baf10561c97609628b8f4136a47dd67 Mon Sep 17 00:00:00 2001 From: Alex Flint Date: Sat, 31 Oct 2015 18:32:43 -0700 Subject: [PATCH] add example.go --- example/example.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 example/example.go 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) +}