From f1f078a0534d840eaa4c5f029974cac270a937bc Mon Sep 17 00:00:00 2001 From: Lena Fuhrimann <6780471+cloudlena@users.noreply.github.com> Date: Mon, 10 Apr 2017 07:36:02 +0200 Subject: [PATCH] Use w.Write() to write to response --- delete-bucket.go | 3 +-- delete-object.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/delete-bucket.go b/delete-bucket.go index 87ec9e8..614113d 100644 --- a/delete-bucket.go +++ b/delete-bucket.go @@ -1,7 +1,6 @@ package main import ( - "fmt" "net/http" "github.com/gorilla/mux" @@ -20,6 +19,6 @@ func DeleteBucketHandler(s3 S3Client) http.Handler { code := http.StatusNoContent w.WriteHeader(code) - fmt.Fprint(w, http.StatusText(code)) + w.Write([]byte(http.StatusText(code))) }) } diff --git a/delete-object.go b/delete-object.go index b76c02b..0c374ee 100644 --- a/delete-object.go +++ b/delete-object.go @@ -1,7 +1,6 @@ package main import ( - "fmt" "net/http" "github.com/gorilla/mux" @@ -20,6 +19,6 @@ func DeleteObjectHandler(s3 S3Client) http.Handler { code := http.StatusNoContent w.WriteHeader(code) - fmt.Fprint(w, http.StatusText(code)) + w.Write([]byte(http.StatusText(code))) }) }