From 1e73c980efc1b135aea6ddbd2978d3da0a35160e Mon Sep 17 00:00:00 2001 From: Adhityaa Date: Wed, 20 Jun 2018 09:20:11 +0530 Subject: [PATCH] api: run go fmt --- api/comment_approve.go | 2 +- api/comment_delete.go | 2 +- api/comment_list.go | 4 ++-- api/comment_new.go | 8 ++++---- api/comment_vote.go | 4 ++-- api/commenter_session.go | 4 ++-- api/database_connect.go | 2 +- api/domain_delete.go | 2 +- api/domain_import_disqus.go | 4 ++-- api/domain_moderator_delete.go | 4 ++-- api/domain_moderator_new.go | 4 ++-- api/domain_new.go | 4 ++-- api/domain_statistics.go | 2 +- api/domain_update.go | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/api/comment_approve.go b/api/comment_approve.go index d39fa58..1af5960 100644 --- a/api/comment_approve.go +++ b/api/comment_approve.go @@ -27,7 +27,7 @@ func commentApprove(commentHex string) error { func commentApproveHandler(w http.ResponseWriter, r *http.Request) { type request struct { CommenterToken *string `json:"commenterToken"` - CommentHex *string `json:"commentHex"` + CommentHex *string `json:"commentHex"` } var x request diff --git a/api/comment_delete.go b/api/comment_delete.go index d7af088..a1a9189 100644 --- a/api/comment_delete.go +++ b/api/comment_delete.go @@ -26,7 +26,7 @@ func commentDelete(commentHex string) error { func commentDeleteHandler(w http.ResponseWriter, r *http.Request) { type request struct { CommenterToken *string `json:"commenterToken"` - CommentHex *string `json:"commentHex"` + CommentHex *string `json:"commentHex"` } var x request diff --git a/api/comment_list.go b/api/comment_list.go index f59f7c3..aae3940 100644 --- a/api/comment_list.go +++ b/api/comment_list.go @@ -92,8 +92,8 @@ func commentList(commenterHex string, domain string, path string, includeUnappro func commentListHandler(w http.ResponseWriter, r *http.Request) { type request struct { CommenterToken *string `json:"CommenterToken"` - Domain *string `json:"domain"` - Path *string `json:"path"` + Domain *string `json:"domain"` + Path *string `json:"path"` } var x request diff --git a/api/comment_new.go b/api/comment_new.go index 7af2296..c240d94 100644 --- a/api/comment_new.go +++ b/api/comment_new.go @@ -37,10 +37,10 @@ func commentNew(commenterHex string, domain string, path string, parentHex strin func commentNewHandler(w http.ResponseWriter, r *http.Request) { type request struct { CommenterToken *string `json:"commenterToken"` - Domain *string `json:"domain"` - Path *string `json:"path"` - ParentHex *string `json:"parentHex"` - Markdown *string `json:"markdown"` + Domain *string `json:"domain"` + Path *string `json:"path"` + ParentHex *string `json:"parentHex"` + Markdown *string `json:"markdown"` } var x request diff --git a/api/comment_vote.go b/api/comment_vote.go index 46fd6ef..356ed77 100644 --- a/api/comment_vote.go +++ b/api/comment_vote.go @@ -46,8 +46,8 @@ func commentVote(commenterHex string, commentHex string, direction int) error { func commentVoteHandler(w http.ResponseWriter, r *http.Request) { type request struct { CommenterToken *string `json:"commenterToken"` - CommentHex *string `json:"commentHex"` - Direction *int `json:"direction"` + CommentHex *string `json:"commentHex"` + Direction *int `json:"direction"` } var x request diff --git a/api/commenter_session.go b/api/commenter_session.go index 0fe3419..3a64701 100644 --- a/api/commenter_session.go +++ b/api/commenter_session.go @@ -9,6 +9,6 @@ import ( // while the session contains more information. type commenterSession struct { CommenterToken string `json:"commenterToken"` - CommenterHex string `json:"commenterHex"` - CreationDate time.Time `json:"creationDate"` + CommenterHex string `json:"commenterHex"` + CreationDate time.Time `json:"creationDate"` } diff --git a/api/database_connect.go b/api/database_connect.go index 202b9bf..d7a011a 100644 --- a/api/database_connect.go +++ b/api/database_connect.go @@ -1,10 +1,10 @@ package main import ( - "time" "database/sql" _ "github.com/lib/pq" "os" + "time" ) func connectDB(retriesLeft int) error { diff --git a/api/domain_delete.go b/api/domain_delete.go index 270500a..83ff8db 100644 --- a/api/domain_delete.go +++ b/api/domain_delete.go @@ -66,7 +66,7 @@ func domainDelete(domain string) error { func domainDeleteHandler(w http.ResponseWriter, r *http.Request) { type request struct { OwnerToken *string `json:"ownerToken"` - Domain *string `json:"domain"` + Domain *string `json:"domain"` } var x request diff --git a/api/domain_import_disqus.go b/api/domain_import_disqus.go index d17834a..41975ee 100644 --- a/api/domain_import_disqus.go +++ b/api/domain_import_disqus.go @@ -169,8 +169,8 @@ func domainImportDisqus(domain string, url string) (int, error) { func domainImportDisqusHandler(w http.ResponseWriter, r *http.Request) { type request struct { OwnerToken *string `json:"ownerToken"` - Domain *string `json:"domain"` - URL *string `json:"url"` + Domain *string `json:"domain"` + URL *string `json:"url"` } var x request diff --git a/api/domain_moderator_delete.go b/api/domain_moderator_delete.go index 0af727d..ce46635 100644 --- a/api/domain_moderator_delete.go +++ b/api/domain_moderator_delete.go @@ -25,8 +25,8 @@ func domainModeratorDelete(domain string, email string) error { func domainModeratorDeleteHandler(w http.ResponseWriter, r *http.Request) { type request struct { OwnerToken *string `json:"ownerToken"` - Domain *string `json:"domain"` - Email *string `json:"email"` + Domain *string `json:"domain"` + Email *string `json:"email"` } var x request diff --git a/api/domain_moderator_new.go b/api/domain_moderator_new.go index 91caa59..40dc2d2 100644 --- a/api/domain_moderator_new.go +++ b/api/domain_moderator_new.go @@ -27,8 +27,8 @@ func domainModeratorNew(domain string, email string) error { func domainModeratorNewHandler(w http.ResponseWriter, r *http.Request) { type request struct { OwnerToken *string `json:"ownerToken"` - Domain *string `json:"domain"` - Email *string `json:"email"` + Domain *string `json:"domain"` + Email *string `json:"email"` } var x request diff --git a/api/domain_new.go b/api/domain_new.go index a6323ce..05a8638 100644 --- a/api/domain_new.go +++ b/api/domain_new.go @@ -27,8 +27,8 @@ func domainNew(ownerHex string, name string, domain string) error { func domainNewHandler(w http.ResponseWriter, r *http.Request) { type request struct { OwnerToken *string `json:"ownerToken"` - Name *string `json:"name"` - Domain *string `json:"domain"` + Name *string `json:"name"` + Domain *string `json:"domain"` } var x request diff --git a/api/domain_statistics.go b/api/domain_statistics.go index 62241db..334bb50 100644 --- a/api/domain_statistics.go +++ b/api/domain_statistics.go @@ -40,7 +40,7 @@ func domainStatistics(domain string) ([]int64, error) { func domainStatisticsHandler(w http.ResponseWriter, r *http.Request) { type request struct { OwnerToken *string `json:"ownerToken"` - Domain *string `json:"domain"` + Domain *string `json:"domain"` } var x request diff --git a/api/domain_update.go b/api/domain_update.go index 4392990..7490875 100644 --- a/api/domain_update.go +++ b/api/domain_update.go @@ -23,7 +23,7 @@ func domainUpdate(d domain) error { func domainUpdateHandler(w http.ResponseWriter, r *http.Request) { type request struct { OwnerToken *string `json:"ownerToken"` - D *domain `json:"domain"` + D *domain `json:"domain"` } var x request