aboutsummaryrefslogtreecommitdiff
path: root/files.go
diff options
context:
space:
mode:
authorNathan Lasseter <Nathan Lasseter nathan@bytemark.co.uk>2015-09-23 22:46:47 +0100
committerNathan Lasseter <Nathan Lasseter nathan@bytemark.co.uk>2015-09-23 22:46:47 +0100
commitd167a89638b4eecad852c66385737ef89354ec99 (patch)
tree7813a4e3c171d32daafd119955fd00c9bc5c932a /files.go
parent3c1b0368c70ed9fd080bd79632645866fe9f5faf (diff)
post /caches now returns created object
Diffstat (limited to 'files.go')
-rw-r--r--files.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/files.go b/files.go
index f1a3d6c..2effe6e 100644
--- a/files.go
+++ b/files.go
@@ -9,8 +9,8 @@ func writeFile(postcache PostCache, filename string) error {
data := postcache.Data
var binary []byte
- n, err := base64.StdEncoding.Decode(binary, []byte(data))
- if n == 0 || err != nil {
+ binary, err := base64.StdEncoding.DecodeString(data)
+ if err != nil {
return err
}