From 66df92ad75382c9364dad542292ba7113606fef7 Mon Sep 17 00:00:00 2001
From: Dean Sheather <dean@deansheather.com>
Date: Sat, 20 Apr 2019 23:03:11 +1000
Subject: [PATCH] gofmt

---
 lib/db/sql.go                   |  2 +-
 lib/routes/banfile.go           |  6 +++---
 lib/routes/deletedbannedfile.go |  1 +
 lib/routes/uploadpomf.go        | 18 +++++++++---------
 4 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/lib/db/sql.go b/lib/db/sql.go
index c12d2c3..533c206 100644
--- a/lib/db/sql.go
+++ b/lib/db/sql.go
@@ -169,7 +169,7 @@ WHERE
 	bucket_key = $2
 `
 
-var updateObjectToTombstoneKeepHashesAndAssociatedUserByBucketKey= `
+var updateObjectToTombstoneKeepHashesAndAssociatedUserByBucketKey = `
 UPDATE
 	objects
 SET
diff --git a/lib/routes/banfile.go b/lib/routes/banfile.go
index 12b7ab4..f7cb4a8 100644
--- a/lib/routes/banfile.go
+++ b/lib/routes/banfile.go
@@ -24,10 +24,10 @@ import (
 type banFileBody struct {
 	ID               string `json:"id"`                // "sha256:abcdef..." or "object:bucket/key"
 	QuarantineSample bool   `json:"quarantine_sample"` // move file to quarantine instead of deleting it
-	Reason           int   `json:"reason"`            // 0=other, 1=malware, 2=takedown, 3=tos_violation
+	Reason           int    `json:"reason"`            // 0=other, 1=malware, 2=takedown, 3=tos_violation
 
-	Description     *string `json:"other_description"` // optional
-	MalwareName     *string `json:"malware_name"`      // required, only when Reason == 1
+	Description *string `json:"other_description"` // optional
+	MalwareName *string `json:"malware_name"`      // required, only when Reason == 1
 }
 
 // createUserResponse is the response body for a successful create user request.
diff --git a/lib/routes/deletedbannedfile.go b/lib/routes/deletedbannedfile.go
index 81a8a2a..cb28a04 100644
--- a/lib/routes/deletedbannedfile.go
+++ b/lib/routes/deletedbannedfile.go
@@ -1,4 +1,5 @@
 package routes
+
 import (
 	"encoding/hex"
 	"net/http"
diff --git a/lib/routes/uploadpomf.go b/lib/routes/uploadpomf.go
index 9a16371..e5aaac4 100644
--- a/lib/routes/uploadpomf.go
+++ b/lib/routes/uploadpomf.go
@@ -223,10 +223,10 @@ func UploadPomf(associateObjectsWithUser bool) func(http.ResponseWriter, *http.R
 					panic(apierrors.FileIsBanned)
 				}
 				fileResponses = append(fileResponses, fileResponse{
-					Success: false,
-					StatusCode: 409,
+					Success:     false,
+					StatusCode:  409,
 					Description: "file is banned",
-					Name: file.Filename,
+					Name:        file.Filename,
 				})
 				continue
 			}
@@ -245,10 +245,10 @@ func UploadPomf(associateObjectsWithUser bool) func(http.ResponseWriter, *http.R
 						panic(apierrors.InternalServerError)
 					}
 					fileResponses = append(fileResponses, fileResponse{
-						Success: false,
-						StatusCode: 500,
+						Success:     false,
+						StatusCode:  500,
 						Description: "internal server error",
-						Name: file.Filename,
+						Name:        file.Filename,
 					})
 				}
 
@@ -264,10 +264,10 @@ func UploadPomf(associateObjectsWithUser bool) func(http.ResponseWriter, *http.R
 						panic(apierrors.InternalServerError)
 					}
 					fileResponses = append(fileResponses, fileResponse{
-						Success: false,
-						StatusCode: 500,
+						Success:     false,
+						StatusCode:  500,
 						Description: "internal server error",
-						Name: file.Filename,
+						Name:        file.Filename,
 					})
 				}
 			} else {
-- 
GitLab