diff options
| author | Jeff Carr <[email protected]> | 2024-11-07 12:49:53 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-07 12:49:53 -0600 |
| commit | 305f4d3e4111aba1acdddb43be701a49bf02d803 (patch) | |
| tree | c536d48ff2b2a042a80072e2ae695eeb563bdef6 /argv.go | |
| parent | e591cdd6857b1d3f2b84d5fa54931758f363300d (diff) | |
the traditional namev0.22.3
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -0,0 +1,26 @@ +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 "gowebd " + VERSION +} + +func init() { + arg.MustParse(&argv) +} |
