events are in cluster.E

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-30 18:10:55 -05:00
parent 97e8fb3fed
commit 123f64f56c
3 changed files with 8 additions and 9 deletions

View File

@ -35,14 +35,13 @@ func createFilename(dir string, filename string) error {
url := urlbase + "/create" url := urlbase + "/create"
body, err := postDropletJSON(url, newDroplet) // body, err := postDropletJSON(url, newDroplet)
if err != nil { // if err != nil {
log.Info("postDropletJSON() failed:", err) // log.Info("postDropletJSON() failed:", err)
return err // return err
} // }
// TODO: try this and use this instead body, err := postDropletWIRE(url, newDroplet)
body, err = postDropletWIRE(url, newDroplet)
if err != nil { if err != nil {
log.Info("postDropletJSON() failed:", err) log.Info("postDropletJSON() failed:", err)
return err return err

View File

@ -55,7 +55,7 @@ func main() {
log.Info("create failed", err) log.Info("create failed", err)
os.Exit(-1) os.Exit(-1)
} }
log.Info("create worked") log.Info("virtigoctl create end")
os.Exit(0) os.Exit(0)
} }
if argv.Start != nil { if argv.Start != nil {

View File

@ -28,7 +28,7 @@ func httpPost(url string, data []byte) ([]byte, error) {
resp, err := client.Do(req) resp, err := client.Do(req)
if err != nil { if err != nil {
log.Error(err) log.Error(err)
return nil, err return []byte("client.Do(req) error"), err
} }
defer resp.Body.Close() defer resp.Body.Close()