From c6ae207c9b865763108c3ecf4f0f3418c6d42962 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 28 Nov 2017 16:04:14 +0100 Subject: [PATCH] gofmt --- routes/api/v1/authors_add_update.go | 4 ++-- routes/api/v1/books_add_update.go | 2 +- routes/api/v1/publishers_add_update.go | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/routes/api/v1/authors_add_update.go b/routes/api/v1/authors_add_update.go index bbc71a2..587756f 100644 --- a/routes/api/v1/authors_add_update.go +++ b/routes/api/v1/authors_add_update.go @@ -6,8 +6,8 @@ import ( "git.mowie.cc/konrad/Library/models" "github.com/labstack/echo" "net/http" - "strings" "strconv" + "strings" ) type authorPayload struct { @@ -41,7 +41,7 @@ func AuthorAddOrUpdate(c echo.Context) error { if datAuthor.Lastname == "" && datAuthor.Forename == "" { return c.JSON(http.StatusBadRequest, models.Message{"Please provide at least one name."}) } - + // Check if we have an ID other than the one in the struct id := c.Param("id") if id != "" { diff --git a/routes/api/v1/books_add_update.go b/routes/api/v1/books_add_update.go index d254684..80e311c 100644 --- a/routes/api/v1/books_add_update.go +++ b/routes/api/v1/books_add_update.go @@ -6,8 +6,8 @@ import ( "git.mowie.cc/konrad/Library/models" "github.com/labstack/echo" "net/http" - "strings" "strconv" + "strings" ) type bookPayload struct { diff --git a/routes/api/v1/publishers_add_update.go b/routes/api/v1/publishers_add_update.go index 0f44150..5ebab9f 100644 --- a/routes/api/v1/publishers_add_update.go +++ b/routes/api/v1/publishers_add_update.go @@ -6,8 +6,8 @@ import ( "git.mowie.cc/konrad/Library/models" "github.com/labstack/echo" "net/http" - "strings" "strconv" + "strings" ) type publisherPayload struct { @@ -37,7 +37,6 @@ func PublisherAddOrUpdate(c echo.Context) error { } } - // Check if we have an ID other than the one in the struct id := c.Param("id") if id != "" {