29 lines
734 B
Go
29 lines
734 B
Go
package digitalocean
|
|
|
|
// initializes logging and command line options
|
|
|
|
import (
|
|
"go.wit.com/dev/alexflint/arg"
|
|
"go.wit.com/log"
|
|
)
|
|
|
|
var NOW *log.LogFlag
|
|
var INFO *log.LogFlag
|
|
var POLL *log.LogFlag
|
|
var argDo ArgsDo
|
|
|
|
// This struct can be used with the go-arg package
|
|
type ArgsDo struct {
|
|
DigitalOceanTimer int `arg:"--digitalocean-poll-interval" help:"how often to poll droplet status (default 60 seconds)"`
|
|
}
|
|
|
|
func init() {
|
|
arg.Register(&argDo)
|
|
full := "go.wit.com/lib/gui/digitalocean"
|
|
short := "DOgui"
|
|
|
|
NOW = log.NewFlag("NOW", true, full, short, "temp debugging stuff")
|
|
INFO = log.NewFlag("INFO", false, full, short, "normal debugging stuff")
|
|
INFO = log.NewFlag("POLL", false, full, short, "show droplet status polling")
|
|
}
|