summaryrefslogtreecommitdiff
path: root/args.go
diff options
context:
space:
mode:
Diffstat (limited to 'args.go')
-rw-r--r--args.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/args.go b/args.go
index 0a36c28..b15d6ac 100644
--- a/args.go
+++ b/args.go
@@ -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)
}