diff --git a/routes/common.go b/routes/common.go index 062c4faf..4c7915cd 100644 --- a/routes/common.go +++ b/routes/common.go @@ -10,7 +10,7 @@ import ( c "github.com/Azareal/Gosora/common" ) -var successJSONBytes = []byte(`{"success":"1"}`) +var successJSONBytes = []byte(`{"success":1}`) func ParseSEOURL(urlBit string) (slug string, id int, err error) { halves := strings.Split(urlBit, ".") @@ -29,7 +29,7 @@ func doPush(w http.ResponseWriter, header *c.Header) { if c.Config.EnableCDNPush { // TODO: Cache these in a sync.Pool? var sb strings.Builder - var push = func(in []string) { + push := func(in []string) { sb.Grow((slen1 + 5) * len(in)) for _, path := range in { sb.WriteString("