blob: 7a9afd884b2f87d1b9256caf9a43546a71679338 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package digitalocean
// initializes logging and command line options
import (
arg "github.com/alexflint/go-arg"
log "go.wit.com/log"
)
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)
INFO.B = false
INFO.Name = "INFO"
INFO.Subsystem = "digitalocean"
INFO.Desc = "Enable log.Info()"
INFO.Register()
POLL.B = false
POLL.Name = "POLL"
POLL.Subsystem = "digitalocean"
POLL.Desc = "Show droplet status polling"
POLL.Register()
}
|