api: run go fmt
This commit is contained in:
parent
405d10766a
commit
8ebc0cd965
@ -20,8 +20,8 @@ func commentCount(domain string, path string) (int, error) {
|
|||||||
|
|
||||||
func commentCountHandler(w http.ResponseWriter, r *http.Request) {
|
func commentCountHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
type request struct {
|
type request struct {
|
||||||
Domain *string `json:"domain"`
|
Domain *string `json:"domain"`
|
||||||
Path *string `json:"path"`
|
Path *string `json:"path"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
@ -3,8 +3,8 @@ package main
|
|||||||
import ()
|
import ()
|
||||||
|
|
||||||
type page struct {
|
type page struct {
|
||||||
Domain string `json:"domain"`
|
Domain string `json:"domain"`
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
IsLocked bool `json:"isLocked"`
|
IsLocked bool `json:"isLocked"`
|
||||||
CommentCount int `json:"commentCount"`
|
CommentCount int `json:"commentCount"`
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,10 @@ func pageUpdate(p page) error {
|
|||||||
|
|
||||||
func pageUpdateHandler(w http.ResponseWriter, r *http.Request) {
|
func pageUpdateHandler(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"`
|
||||||
Attributes *page `json:"attributes"`
|
Attributes *page `json:"attributes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var x request
|
var x request
|
||||||
|
Loading…
Reference in New Issue
Block a user