summaryrefslogtreecommitdiff
path: root/args.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-08 11:36:46 -0500
committerJeff Carr <[email protected]>2024-10-11 17:15:57 -0500
commitd827c398f00e965f5b57447c7d730f96442e1173 (patch)
tree0b89a8c17918ecdbb28887e4b228ab746517939c /args.go
parentc6be85e92f00b527ccd2e7bf55f804f9a1619e88 (diff)
try to rename as gowebd
put the HTML assets raw in the binary also I'm how old and still committed a binary. squashed Signed-off-by: Jeff Carr <[email protected]>
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)
}