Use w.Write() to write to response

This commit is contained in:
Lena Fuhrimann 2017-04-10 07:36:02 +02:00
parent 84072b3be3
commit f1f078a053
2 changed files with 2 additions and 4 deletions

View file

@ -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)))
})
}

View file

@ -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)))
})
}