This commit is contained in:
Jeff Carr 2025-02-15 06:44:55 -06:00
parent f6b9e6d86a
commit 46e329f419
3 changed files with 3 additions and 1 deletions

View File

@ -15,7 +15,7 @@ var argv args
type args struct { type args struct {
Daemon bool `arg:"--daemon" default:"false" help:"run in daemon mode"` Daemon bool `arg:"--daemon" default:"false" help:"run in daemon mode"`
Port int `arg:"--port" default:"2521" help:"port to run on"` Port int `arg:"--port" default:"2521" help:"port to run on"`
URL string `arg:"--url" default:"2521" help:"url to use"` URL string `arg:"--url" help:"url to use"`
} }
func (args) Version() string { func (args) Version() string {

View File

@ -34,6 +34,7 @@ func main() {
me = new(stuff) me = new(stuff)
me.urlbase = "http://zookeeper.grid.wit.com:8080" me.urlbase = "http://zookeeper.grid.wit.com:8080"
if argv.URL != "" { if argv.URL != "" {
log.Info("USING ARGV URL:", argv.URL)
me.urlbase = argv.URL me.urlbase = argv.URL
} }

View File

@ -48,6 +48,7 @@ func sendMachine(s string) error {
} }
body, err := httpPost(url, msg) body, err := httpPost(url, msg)
if err != nil { if err != nil {
log.Info("httpPost() failed: url", url)
log.Info("httpPost() failed:", err) log.Info("httpPost() failed:", err)
return err return err
} }