api: run go fmt
This commit is contained in:
parent
510257fd8b
commit
1e73c980ef
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"`
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
"database/sql"
|
||||
_ "github.com/lib/pq"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
func connectDB(retriesLeft int) error {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user