From 5c2938d9700402f37bd927df040d1e28dfc0fe3c Mon Sep 17 00:00:00 2001 From: Michael de Wit Date: Thu, 22 Dec 2016 11:54:53 +0100 Subject: [PATCH] Format code --- remote/gogs/fixtures/handler.go | 14 +++++++------- remote/gogs/gogs.go | 2 +- remote/gogs/gogs_test.go | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/remote/gogs/fixtures/handler.go b/remote/gogs/fixtures/handler.go index ebc81702..5904a1dd 100644 --- a/remote/gogs/fixtures/handler.go +++ b/remote/gogs/fixtures/handler.go @@ -30,13 +30,13 @@ func getRepo(c *gin.Context) { } func getRepoFile(c *gin.Context) { - if c.Param("file") == "file_not_found" { - c.String(404, "") - } - if c.Param("commit") == "v1.0.0" || c.Param("commit") == "9ecad50" { - c.String(200, repoFilePayload) - } - c.String(404, "") + if c.Param("file") == "file_not_found" { + c.String(404, "") + } + if c.Param("commit") == "v1.0.0" || c.Param("commit") == "9ecad50" { + c.String(200, repoFilePayload) + } + c.String(404, "") } func createRepoHook(c *gin.Context) { diff --git a/remote/gogs/gogs.go b/remote/gogs/gogs.go index 88be743c..cbf2e81f 100644 --- a/remote/gogs/gogs.go +++ b/remote/gogs/gogs.go @@ -6,7 +6,7 @@ import ( "net" "net/http" "net/url" - "strings" + "strings" "github.com/drone/drone/model" "github.com/drone/drone/remote" diff --git a/remote/gogs/gogs_test.go b/remote/gogs/gogs_test.go index 70bd9a78..bfd8728c 100644 --- a/remote/gogs/gogs_test.go +++ b/remote/gogs/gogs_test.go @@ -128,11 +128,11 @@ func Test_gogs(t *testing.T) { g.Assert(string(raw)).Equal("{ platform: linux/amd64 }") }) - g.It("Should return a repository file from a ref", func() { - raw, err := c.File(fakeUser, fakeRepo, fakeBuildWithRef, ".drone.yml") + g.It("Should return a repository file from a ref", func() { + raw, err := c.File(fakeUser, fakeRepo, fakeBuildWithRef, ".drone.yml") g.Assert(err == nil).IsTrue() g.Assert(string(raw)).Equal("{ platform: linux/amd64 }") - }) + }) g.Describe("Given an authentication request", func() { g.It("Should redirect to login form") @@ -185,7 +185,7 @@ var ( Commit: "9ecad50", } - fakeBuildWithRef = &model.Build{ - Ref: "refs/tags/v1.0.0", - } + fakeBuildWithRef = &model.Build{ + Ref: "refs/tags/v1.0.0", + } )