From b9cacba247165f1c39ad9cfa810b8af2046defc5 Mon Sep 17 00:00:00 2001
From: Travis Ralston <travpc@gmail.com>
Date: Wed, 31 Jul 2019 17:53:01 -0600
Subject: [PATCH] Apply code formatting

---
 .circleci/config.yml                                 | 2 +-
 api/custom/federation.go                             | 2 +-
 api/custom/quarantine.go                             | 4 ++--
 appveyor.yml                                         | 2 +-
 config.sample.yaml                                   | 2 +-
 controllers/preview_controller/preview_controller.go | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 3db58f54..57ac2299 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -6,7 +6,7 @@ jobs:
     working_directory: /go/src/github.com/turt2live/matrix-media-repo
     steps:
       - checkout
-      - run: 
+      - run:
           name: build binaries
           command: 'GOBIN=$PWD/`dirname $0`/bin go install -v ./cmd/...'
       - store_artifacts:
diff --git a/api/custom/federation.go b/api/custom/federation.go
index 61543faf..728b3423 100644
--- a/api/custom/federation.go
+++ b/api/custom/federation.go
@@ -50,5 +50,5 @@ func GetFederationInfo(r *http.Request, log *logrus.Entry, user api.UserInfo) in
 	resp["base_url"] = url
 	resp["hostname"] = hostname
 	resp["versions_response"] = out
-	return &api.DoNotCacheResponse{Payload:resp}
+	return &api.DoNotCacheResponse{Payload: resp}
 }
diff --git a/api/custom/quarantine.go b/api/custom/quarantine.go
index ce038099..f28a5c01 100644
--- a/api/custom/quarantine.go
+++ b/api/custom/quarantine.go
@@ -69,7 +69,7 @@ func QuarantineRoomMedia(r *http.Request, log *logrus.Entry, user api.UserInfo)
 		total += resp.(*MediaQuarantinedResponse).NumQuarantined
 	}
 
-	return &api.DoNotCacheResponse{Payload:&MediaQuarantinedResponse{NumQuarantined: total}}
+	return &api.DoNotCacheResponse{Payload: &MediaQuarantinedResponse{NumQuarantined: total}}
 }
 
 func QuarantineMedia(r *http.Request, log *logrus.Entry, user api.UserInfo) interface{} {
@@ -94,7 +94,7 @@ func QuarantineMedia(r *http.Request, log *logrus.Entry, user api.UserInfo) inte
 	}
 
 	resp, _ := doQuarantine(r.Context(), log, server, mediaId, allowOtherHosts)
-	return &api.DoNotCacheResponse{Payload:resp}
+	return &api.DoNotCacheResponse{Payload: resp}
 }
 
 func doQuarantine(ctx context.Context, log *logrus.Entry, origin string, mediaId string, allowOtherHosts bool) (interface{}, bool) {
diff --git a/appveyor.yml b/appveyor.yml
index b3b20812..a1d424a2 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -5,7 +5,7 @@ clone_folder: c:\gopath\src\github.com\turt2live\matrix-media-repo
 environment:
   GOPATH: c:\gopath
   GOVERSION: 1.12
-  
+
 branches:
   only: [master, develop]
 
diff --git a/config.sample.yaml b/config.sample.yaml
index 75d839e0..05ae3b86 100644
--- a/config.sample.yaml
+++ b/config.sample.yaml
@@ -99,7 +99,7 @@ uploads:
   # placed anywhere to match everything (eg: "image/*" matches all images). This will also
   # restrict which file types are downloaded from remote servers.
   allowedTypes:
-   - "*/*"
+    - "*/*"
 
   # Specific users can have their own set of allowed file types. These are applied instead
   # of those listed in the allowedTypes list when a user is found. Much like allowedTypes,
diff --git a/controllers/preview_controller/preview_controller.go b/controllers/preview_controller/preview_controller.go
index 02a6bf8b..e0acd5af 100644
--- a/controllers/preview_controller/preview_controller.go
+++ b/controllers/preview_controller/preview_controller.go
@@ -40,7 +40,7 @@ func GetPreview(urlStr string, onHost string, forUserId string, atTs int64, ctx
 		now := util.NowMillis()
 		atTsBk := stores.GetBucketTs(atTs)
 		nowBk := stores.GetBucketTs(now)
-		if (now - atTs) > 60000 && atTsBk != nowBk {
+		if (now-atTs) > 60000 && atTsBk != nowBk {
 			// Because we don't have a cached preview, we'll use the current time as the preview time.
 			// We also give a 60 second buffer so we don't cause an infinite loop (considering we're
 			// calling ourselves), and to give a lenient opportunity for slow execution.
-- 
GitLab