summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-30 18:10:55 -0500
committerJeff Carr <[email protected]>2024-10-30 18:10:55 -0500
commit123f64f56c480c9b40eb88010fe91701c33de0af (patch)
treefd723c46f10d206e1bc551bcc33e6c1952af0e52
parent97e8fb3fed8e39c8f9c51df331945c1217d317bd (diff)
events are in cluster.E
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--create.go13
-rw-r--r--main.go2
-rw-r--r--post.go2
3 files changed, 8 insertions, 9 deletions
diff --git a/create.go b/create.go
index 033f527..ff8c89b 100644
--- a/create.go
+++ b/create.go
@@ -35,14 +35,13 @@ func createFilename(dir string, filename string) error {
url := urlbase + "/create"
- body, err := postDropletJSON(url, newDroplet)
- if err != nil {
- log.Info("postDropletJSON() failed:", err)
- return err
- }
+// body, err := postDropletJSON(url, newDroplet)
+// if err != nil {
+// log.Info("postDropletJSON() failed:", err)
+// return err
+// }
- // TODO: try this and use this instead
- body, err = postDropletWIRE(url, newDroplet)
+ body, err := postDropletWIRE(url, newDroplet)
if err != nil {
log.Info("postDropletJSON() failed:", err)
return err
diff --git a/main.go b/main.go
index 51b9f71..366687e 100644
--- a/main.go
+++ b/main.go
@@ -55,7 +55,7 @@ func main() {
log.Info("create failed", err)
os.Exit(-1)
}
- log.Info("create worked")
+ log.Info("virtigoctl create end")
os.Exit(0)
}
if argv.Start != nil {
diff --git a/post.go b/post.go
index ccdfb11..08c487d 100644
--- a/post.go
+++ b/post.go
@@ -28,7 +28,7 @@ func httpPost(url string, data []byte) ([]byte, error) {
resp, err := client.Do(req)
if err != nil {
log.Error(err)
- return nil, err
+ return []byte("client.Do(req) error"), err
}
defer resp.Body.Close()