diff options
Diffstat (limited to 'args.go')
| -rw-r--r-- | args.go | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -10,11 +10,17 @@ import ( "go.wit.com/dev/alexflint/arg" ) -var args struct { +var argv args + +type args struct { ListRepos bool `arg:"--list-repos" help:"list all repositories"` - Port int `arg:"--port" help:"port to run on (default is 2520)"` + Port int `arg:"--port" default:"2520" help:"port to run on"` +} + +func (args) Version() string { + return "virtigo " + Version } func init() { - arg.MustParse(&args) + arg.MustParse(&argv) } |
