build: Enable gometalinter "unconvert" check

This commit is contained in:
Jakob Borg
2016-12-17 15:37:11 +01:00
committed by Jakob Borg
parent 744c2e82b5
commit 47f22ff3e5
12 changed files with 17 additions and 15 deletions

View File

@@ -249,13 +249,13 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
switch r.Method {
case "GET":
if limit(r.RemoteAddr, getLRUCache, getMut, getLimit, int64(getLimitBurst)) {
if limit(r.RemoteAddr, getLRUCache, getMut, getLimit, getLimitBurst) {
w.WriteHeader(429)
return
}
handleGetRequest(w, r)
case "POST":
if limit(r.RemoteAddr, postLRUCache, postMut, postLimit, int64(postLimitBurst)) {
if limit(r.RemoteAddr, postLRUCache, postMut, postLimit, postLimitBurst) {
w.WriteHeader(429)
return
}