api: run go fmt

This commit is contained in:
Adhityaa 2018-06-20 09:20:11 +05:30
parent 510257fd8b
commit 1e73c980ef
14 changed files with 24 additions and 24 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"`
}

View File

@ -1,10 +1,10 @@
package main
import (
"time"
"database/sql"
_ "github.com/lib/pq"
"os"
"time"
)
func connectDB(retriesLeft int) error {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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