virtigo/argv.go

28 lines
653 B
Go

package main
/*
this parses the command line arguements
this enables command line options from other packages like 'gui' and 'log'
*/
var argv args
type args struct {
Hosts []string `arg:"--hosts" help:"hosts to connect to"`
Uptime bool `arg:"--uptime" default:"true" help:"allow uptime checks for things like Kuma"`
Port int `arg:"--port" default:"8080" help:"specify a different default port"`
}
func (a args) Description() string {
return `
virtigo will help control your cluster of hypervisiors
go install go.wit.com/apps/virtigo@latest
`
}
func (args) Version() string {
return "virtigo " + Version
}