api: run go fmt

This commit is contained in:
Adhityaa Chandrasekar 2018-09-23 01:12:52 -04:00
parent 405d10766a
commit 8ebc0cd965
3 changed files with 10 additions and 10 deletions

View File

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

View File

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

View File

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