add example.go

This commit is contained in:
Alex Flint 2015-10-31 18:32:43 -07:00
parent 76293a5a72
commit 7e1437715b
1 changed files with 14 additions and 0 deletions

14
example/example.go Normal file
View File

@ -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)
}