summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/blog_cli/main.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/blog_cli/main.go b/tools/blog_cli/main.go
index 2dd879366316..db64f8378e40 100644
--- a/tools/blog_cli/main.go
+++ b/tools/blog_cli/main.go
@@ -36,7 +36,7 @@ var chunkSize = 200
 type day time.Time
 
 func (d day) MarshalJSON() ([]byte, error) {
-	j := (time.Time(d)).Format("2006-01-02")
+	j := (time.Time(d)).Format(`"2006-01-02"`)
 	return []byte(j), nil
 }
 
@@ -97,7 +97,11 @@ func (p *post) writeToDNS() error {
 
 // Encode given value as JSON and base64-encode it.
 func encodeJSON(v interface{}) string {
-	outer, _ := json.Marshal(v)
+	outer, err := json.Marshal(v)
+	if err != nil {
+		log.Fatalln("Failed to encode JSON", err)
+	}
+
 	return base64.RawStdEncoding.EncodeToString(outer)
 }