remove server logs and util file
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Adrien Marquès 2020-04-04 12:06:31 +02:00
parent 60ef4717a8
commit 92da498d49
Signed by: xdrm-brackets
GPG Key ID: D75243CA236D825E
2 changed files with 0 additions and 16 deletions

View File

@ -73,7 +73,6 @@ func errorHandler(err api.Error) http.HandlerFunc {
return func(res http.ResponseWriter, req *http.Request) { return func(res http.ResponseWriter, req *http.Request) {
r := api.EmptyResponse().WithError(err) r := api.EmptyResponse().WithError(err)
r.ServeHTTP(res, req) r.ServeHTTP(res, req)
logError(r)
} }
} }

15
util.go
View File

@ -1,15 +0,0 @@
package aicra
import (
"log"
"net/http"
"git.xdrm.io/go/aicra/api"
)
var handledMethods = []string{http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete}
// Prints an error as HTTP response
func logError(res *api.Response) {
log.Printf("[http.fail] %v\n", res)
}