summaryrefslogtreecommitdiff
path: root/create.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-18 01:33:28 -0600
committerJeff Carr <[email protected]>2024-01-18 01:33:28 -0600
commitf0b712faf865b460b8be7a9edfd78e1b3852cae5 (patch)
treea20ae083ec79e99ba1c2cbe828edbee12c9d8911 /create.go
parent586494505bb57aa1c4383641c6693a7021e1621d (diff)
fix pathsv0.12.3
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'create.go')
-rw-r--r--create.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/create.go b/create.go
index 554f634..2e8d5f0 100644
--- a/create.go
+++ b/create.go
@@ -6,7 +6,7 @@
package cloudflare
-import (
+import (
"os"
"go.wit.com/log"
@@ -17,11 +17,11 @@ func Create(zone string, hostname string, value string) bool {
key := os.Getenv("CF_API_KEY")
email := os.Getenv("CF_API_EMAIL")
- if (key == "") {
+ if key == "" {
log.Warn("cloudflare.Create() MISSING environment variable CF_API_KEY")
return false
}
- if (email == "") {
+ if email == "" {
log.Warn("cloudflare.Create() MISSING environment variable CF_API_EMAIL")
return false
}
@@ -30,12 +30,12 @@ func Create(zone string, hostname string, value string) bool {
var z *ConfigT
for d, v := range Config {
log.Log(INFO, "cloudflare.Create() zone =", d, "value =", v)
- if (zone == d) {
+ if zone == d {
z = Config[zone]
log.Log(INFO, "cloudflare.Create() FOUND ZONE", zone, "ID =", z.ZoneID)
}
}
- if (z == nil) {
+ if z == nil {
log.Warn("cloudflare.Create() COULD NOT FIND ZONE", zone)
return false
}
@@ -48,7 +48,7 @@ func Create(zone string, hostname string, value string) bool {
data += `"type": "AAAA", `
data += `"ttl": "1", `
data += `"comment": "WIT DNS Control Panel"`
- data += `}`
+ data += `}`
result := doCurlCreate(key, email, z.ZoneID, data)
pretty, _ := FormatJSON(result)