summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-11 22:39:19 -0500
committerJeff Carr <[email protected]>2024-10-11 22:39:19 -0500
commitf71da2ef59a51788f32b5fe5eb600ce40dbbdd75 (patch)
tree05e6311b676054812a5f9cc1bd8f96689755ac3a /argv.go
parentf7ae394d20faab6d6d89554416e0e3bf7dbb2547 (diff)
still does nothing yet
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/argv.go b/argv.go
new file mode 100644
index 0000000..906dd65
--- /dev/null
+++ b/argv.go
@@ -0,0 +1,25 @@
+package main
+
+/*
+ this parses the command line arguements
+ this enables command line options from other packages like 'gui' and 'log'
+*/
+
+import (
+ "go.wit.com/dev/alexflint/arg"
+)
+
+var argv args
+
+type args struct {
+ ListRepos bool `arg:"--list-repos" help:"list all repositories"`
+ Port int `arg:"--port" default:"2520" help:"port to run on"`
+}
+
+func (args) Version() string {
+ return "virtigod " + Version
+}
+
+func init() {
+ arg.MustParse(&argv)
+}