go.wit.com/log is now primitive
This commit is contained in:
parent
df007743b0
commit
6ab8383946
6
Makefile
6
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
|
||||
|
||||
|
|
10
api.go
10
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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
2
http.go
2
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")
|
||||
|
|
4
rr.go
4
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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue