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) {
|
func commentApproveHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
CommenterToken *string `json:"commenterToken"`
|
CommenterToken *string `json:"commenterToken"`
|
||||||
CommentHex *string `json:"commentHex"`
|
CommentHex *string `json:"commentHex"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
@ -26,7 +26,7 @@ func commentDelete(commentHex string) error {
|
|||||||
func commentDeleteHandler(w http.ResponseWriter, r *http.Request) {
|
func commentDeleteHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
CommenterToken *string `json:"commenterToken"`
|
CommenterToken *string `json:"commenterToken"`
|
||||||
CommentHex *string `json:"commentHex"`
|
CommentHex *string `json:"commentHex"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
@ -92,8 +92,8 @@ func commentList(commenterHex string, domain string, path string, includeUnappro
|
|||||||
func commentListHandler(w http.ResponseWriter, r *http.Request) {
|
func commentListHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
CommenterToken *string `json:"CommenterToken"`
|
CommenterToken *string `json:"CommenterToken"`
|
||||||
Domain *string `json:"domain"`
|
Domain *string `json:"domain"`
|
||||||
Path *string `json:"path"`
|
Path *string `json:"path"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
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) {
|
func commentNewHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
CommenterToken *string `json:"commenterToken"`
|
CommenterToken *string `json:"commenterToken"`
|
||||||
Domain *string `json:"domain"`
|
Domain *string `json:"domain"`
|
||||||
Path *string `json:"path"`
|
Path *string `json:"path"`
|
||||||
ParentHex *string `json:"parentHex"`
|
ParentHex *string `json:"parentHex"`
|
||||||
Markdown *string `json:"markdown"`
|
Markdown *string `json:"markdown"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
@ -46,8 +46,8 @@ func commentVote(commenterHex string, commentHex string, direction int) error {
|
|||||||
func commentVoteHandler(w http.ResponseWriter, r *http.Request) {
|
func commentVoteHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
CommenterToken *string `json:"commenterToken"`
|
CommenterToken *string `json:"commenterToken"`
|
||||||
CommentHex *string `json:"commentHex"`
|
CommentHex *string `json:"commentHex"`
|
||||||
Direction *int `json:"direction"`
|
Direction *int `json:"direction"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
@ -9,6 +9,6 @@ import (
|
|||||||
// while the session contains more information.
|
// while the session contains more information.
|
||||||
type commenterSession struct {
|
type commenterSession struct {
|
||||||
CommenterToken string `json:"commenterToken"`
|
CommenterToken string `json:"commenterToken"`
|
||||||
CommenterHex string `json:"commenterHex"`
|
CommenterHex string `json:"commenterHex"`
|
||||||
CreationDate time.Time `json:"creationDate"`
|
CreationDate time.Time `json:"creationDate"`
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
|
||||||
"database/sql"
|
"database/sql"
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func connectDB(retriesLeft int) error {
|
func connectDB(retriesLeft int) error {
|
||||||
|
@ -66,7 +66,7 @@ func domainDelete(domain string) error {
|
|||||||
func domainDeleteHandler(w http.ResponseWriter, r *http.Request) {
|
func domainDeleteHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
OwnerToken *string `json:"ownerToken"`
|
OwnerToken *string `json:"ownerToken"`
|
||||||
Domain *string `json:"domain"`
|
Domain *string `json:"domain"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
@ -169,8 +169,8 @@ func domainImportDisqus(domain string, url string) (int, error) {
|
|||||||
func domainImportDisqusHandler(w http.ResponseWriter, r *http.Request) {
|
func domainImportDisqusHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
OwnerToken *string `json:"ownerToken"`
|
OwnerToken *string `json:"ownerToken"`
|
||||||
Domain *string `json:"domain"`
|
Domain *string `json:"domain"`
|
||||||
URL *string `json:"url"`
|
URL *string `json:"url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
@ -25,8 +25,8 @@ func domainModeratorDelete(domain string, email string) error {
|
|||||||
func domainModeratorDeleteHandler(w http.ResponseWriter, r *http.Request) {
|
func domainModeratorDeleteHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
OwnerToken *string `json:"ownerToken"`
|
OwnerToken *string `json:"ownerToken"`
|
||||||
Domain *string `json:"domain"`
|
Domain *string `json:"domain"`
|
||||||
Email *string `json:"email"`
|
Email *string `json:"email"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
@ -27,8 +27,8 @@ func domainModeratorNew(domain string, email string) error {
|
|||||||
func domainModeratorNewHandler(w http.ResponseWriter, r *http.Request) {
|
func domainModeratorNewHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
OwnerToken *string `json:"ownerToken"`
|
OwnerToken *string `json:"ownerToken"`
|
||||||
Domain *string `json:"domain"`
|
Domain *string `json:"domain"`
|
||||||
Email *string `json:"email"`
|
Email *string `json:"email"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
@ -27,8 +27,8 @@ func domainNew(ownerHex string, name string, domain string) error {
|
|||||||
func domainNewHandler(w http.ResponseWriter, r *http.Request) {
|
func domainNewHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
OwnerToken *string `json:"ownerToken"`
|
OwnerToken *string `json:"ownerToken"`
|
||||||
Name *string `json:"name"`
|
Name *string `json:"name"`
|
||||||
Domain *string `json:"domain"`
|
Domain *string `json:"domain"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
@ -40,7 +40,7 @@ func domainStatistics(domain string) ([]int64, error) {
|
|||||||
func domainStatisticsHandler(w http.ResponseWriter, r *http.Request) {
|
func domainStatisticsHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
OwnerToken *string `json:"ownerToken"`
|
OwnerToken *string `json:"ownerToken"`
|
||||||
Domain *string `json:"domain"`
|
Domain *string `json:"domain"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
@ -23,7 +23,7 @@ func domainUpdate(d domain) error {
|
|||||||
func domainUpdateHandler(w http.ResponseWriter, r *http.Request) {
|
func domainUpdateHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
OwnerToken *string `json:"ownerToken"`
|
OwnerToken *string `json:"ownerToken"`
|
||||||
D *domain `json:"domain"`
|
D *domain `json:"domain"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
Loading…
Reference in New Issue
Block a user