2024-02-10 16:35:30 -06:00
|
|
|
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"
|
|
|
|
)
|
|
|
|
|
2024-10-08 11:36:46 -05:00
|
|
|
var argv args
|
|
|
|
|
|
|
|
type args struct {
|
2024-02-10 16:35:30 -06:00
|
|
|
ListRepos bool `arg:"--list-repos" help:"list all repositories"`
|
2024-10-08 11:36:46 -05:00
|
|
|
Port int `arg:"--port" default:"2520" help:"port to run on"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (args) Version() string {
|
|
|
|
return "virtigo " + Version
|
2024-02-10 16:35:30 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2024-10-08 11:36:46 -05:00
|
|
|
arg.MustParse(&argv)
|
2024-02-10 16:35:30 -06:00
|
|
|
}
|