From a0eae6922df7ff5587a4c860136a40d258d3cfde Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Wed, 31 May 2017 07:12:22 +0200 Subject: [PATCH] mediaapi/writers: Remove unnecessary fmt.Sprintf --- .../matrix-org/dendrite/mediaapi/writers/upload.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/mediaapi/writers/upload.go b/src/github.com/matrix-org/dendrite/mediaapi/writers/upload.go index 5ae4936e2..dc525ee44 100644 --- a/src/github.com/matrix-org/dendrite/mediaapi/writers/upload.go +++ b/src/github.com/matrix-org/dendrite/mediaapi/writers/upload.go @@ -119,7 +119,7 @@ func (r *uploadRequest) doUpload(reqReader io.Reader, cfg *config.MediaAPI, db * fileutils.RemoveDir(tmpDir, r.Logger) return &util.JSONResponse{ Code: 400, - JSON: jsonerror.Unknown(fmt.Sprintf("Failed to upload")), + JSON: jsonerror.Unknown("Failed to upload"), } } @@ -222,7 +222,7 @@ func (r *uploadRequest) storeFileAndMetadata(tmpDir types.Path, absBasePath type r.Logger.WithError(err).Error("Failed to move file.") return &util.JSONResponse{ Code: 400, - JSON: jsonerror.Unknown(fmt.Sprintf("Failed to upload")), + JSON: jsonerror.Unknown("Failed to upload"), } } if duplicate { @@ -239,7 +239,7 @@ func (r *uploadRequest) storeFileAndMetadata(tmpDir types.Path, absBasePath type } return &util.JSONResponse{ Code: 400, - JSON: jsonerror.Unknown(fmt.Sprintf("Failed to upload")), + JSON: jsonerror.Unknown("Failed to upload"), } }