diff options
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 27 |
1 files changed, 20 insertions, 7 deletions
@@ -11,12 +11,25 @@ import "go.wit.com/log" var argv args type args struct { - Verbose bool `arg:"--verbose" help:"talk more"` - Config string `arg:"env:VIRTIGO_HOME" help:"defaults to ~/.config/virtigo/"` - Port int `arg:"--port" default:"8080" help:"allow droplet events via http"` - Server string `arg:"env:VIRTIGO_SERVER" help:"what virtigo cluster to connect to"` - Xml []string `arg:"--libvirt" help:"import qemu xml files: --libvirt /etc/libvirt/qemu/*.xml"` - Admin bool `arg:"--admin" help:"enter admin mode"` + List *ListCmd `arg:"subcommand:list" help:"list things"` + Config string `arg:"env:VIRTIGO_HOME" help:"defaults to ~/.config/virtigo/"` + Server string `arg:"env:VIRTIGO_SERVER" help:"what virtigo cluster to connect to"` + Verbose bool `arg:"--verbose" help:"talk more"` + Port int `arg:"--port" default:"8080" help:"allow droplet events via http"` + Xml []string `arg:"--libvirt" help:"import qemu xml files: --libvirt /etc/libvirt/qemu/*.xml"` + Admin bool `arg:"--admin" help:"enter admin mode"` + Bash bool `arg:"--bash" help:"generate bash completion"` + BashAuto []string `arg:"--auto-complete" help:"todo: move this to go-arg"` +} + +type EmptyCmd struct { +} + +type testCmd string + +type ListCmd struct { + Droplets *EmptyCmd `arg:"subcommand:droplets" help:"list droplets"` + Hypervisors *EmptyCmd `arg:"subcommand:hypervisors" help:"list hypervisors"` } func (a args) Description() string { @@ -30,7 +43,7 @@ This app talks to your hypervisors via the virtigod daemon. } func (args) Version() string { - return "virtigo " + Version + return ARGNAME + " " + VERSION + " Built on " + BUILDTIME } var INFO *log.LogFlag |
