diff options
| -rw-r--r-- | Makefile | 6 | ||||
| -rw-r--r-- | api.go | 10 | ||||
| -rw-r--r-- | create.go | 2 | ||||
| -rw-r--r-- | http.go | 2 | ||||
| -rw-r--r-- | rr.go | 4 |
5 files changed, 13 insertions, 11 deletions
@@ -1,6 +1,10 @@ -all: +all: vet @echo this is a gui for the cloudflare package +vet: + @GO111MODULE=off go vet + @echo go vet: this go library package builds okay + goimports: goimports -w *.go @@ -90,10 +90,10 @@ func SetRow(dnsRow *RRT) { // show the JSON tmp := makeJSON(dnsRow) - log.Spew(tmp) + log.Info(tmp) if CFdialog.curlNode != nil { pretty, _ := FormatJSON(tmp) - log.Spew("http PUT curl =", pretty) + log.Info("http PUT curl =", pretty) CFdialog.curlNode.SetText(pretty) } } @@ -116,7 +116,7 @@ func GetZonefile(c *ConfigT) *DNSRecords { client := &http.Client{} resp, err := client.Do(req) - // log.Spew("SPEWING", resp) + // log.Info("SPEWING", resp) if err != nil { log.Error(err, "http.Client error") return nil @@ -128,7 +128,7 @@ func GetZonefile(c *ConfigT) *DNSRecords { log.Error(err, "ioutil.ReadAll() error") return nil } - log.Spew("SPEWING", body) + log.Info("SPEWING", body) pretty, err := FormatJSON(string(body)) if err != nil { log.Error(err, "FormatJSON error") @@ -219,7 +219,7 @@ func GetZones(auth, email string) *DNSRecords { */ for _, record := range records.Result { - log.Spew("spew record:", record) + log.Info("spew record:", record) log.Info("record:", record.Name, record.ID) var newc *ConfigT @@ -52,6 +52,6 @@ func Create(zone string, hostname string, value string) bool { result := doCurlCreate(key, email, z.ZoneID, data) pretty, _ := FormatJSON(result) - log.Spew("cloudflare.Create() result =", pretty) + log.Info("cloudflare.Create() result =", pretty) return true } @@ -181,8 +181,6 @@ func curlPost(dnsRow *RRT) string { log.Error(err) return "" } - log.Spew("http PUT body =", body) - pretty, _ := FormatJSON(string(body)) log.Log(CURL, "result =", pretty) log.Log(CURL, "curl() END") @@ -130,7 +130,7 @@ func CreateRR(myGui *gui.Node, zone string, zoneID string) *gadgets.BasicWindow CFdialog.resultNode.SetText(result) pretty, _ := FormatJSON(result) - log.Spew(pretty) + log.Info(pretty) }) group.NewButton("Update RR doCurl(PUT)", func() { @@ -142,7 +142,7 @@ func CreateRR(myGui *gui.Node, zone string, zoneID string) *gadgets.BasicWindow CFdialog.resultNode.SetText(result) pretty, _ := FormatJSON(result) - log.Spew(pretty) + log.Info(pretty) }) // CFdialog.saveNode.Disable() |
