summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--api.go10
-rw-r--r--create.go2
-rw-r--r--http.go2
-rw-r--r--rr.go4
5 files changed, 13 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 3fef058..04f1362 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/api.go b/api.go
index 464dbbd..7811ff2 100644
--- a/api.go
+++ b/api.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
diff --git a/create.go b/create.go
index 2e8d5f0..796a432 100644
--- a/create.go
+++ b/create.go
@@ -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
}
diff --git a/http.go b/http.go
index b503859..6b95993 100644
--- a/http.go
+++ b/http.go
@@ -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")
diff --git a/rr.go b/rr.go
index de2d275..b8e711f 100644
--- a/rr.go
+++ b/rr.go
@@ -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()