From 92da498d49d7caea9bb701e4f4c06f67918ae64e Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 4 Apr 2020 12:06:31 +0200 Subject: [PATCH] remove server logs and util file --- server.go | 1 - util.go | 15 --------------- 2 files changed, 16 deletions(-) delete mode 100644 util.go diff --git a/server.go b/server.go index ab4423a..15fd030 100644 --- a/server.go +++ b/server.go @@ -73,7 +73,6 @@ func errorHandler(err api.Error) http.HandlerFunc { return func(res http.ResponseWriter, req *http.Request) { r := api.EmptyResponse().WithError(err) r.ServeHTTP(res, req) - logError(r) } } diff --git a/util.go b/util.go deleted file mode 100644 index a143dcd..0000000 --- a/util.go +++ /dev/null @@ -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) -}