chore(lint): upgrade linter to v1.56.2

This commit is contained in:
Quentin McGaw
2024-03-21 09:48:02 +00:00
parent fb00fb16c2
commit c0621bf381
20 changed files with 74 additions and 35 deletions

View File

@@ -34,24 +34,24 @@ func (h *openvpnHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
case http.MethodPut:
h.setStatus(w, r)
default:
http.Error(w, "method "+r.Method+" not supported", http.StatusBadRequest)
errMethodNotSupported(w, r.Method)
}
case "/settings":
switch r.Method {
case http.MethodGet:
h.getSettings(w)
default:
http.Error(w, "method "+r.Method+" not supported", http.StatusBadRequest)
errMethodNotSupported(w, r.Method)
}
case "/portforwarded":
switch r.Method {
case http.MethodGet:
h.getPortForwarded(w)
default:
http.Error(w, "method "+r.Method+" not supported", http.StatusBadRequest)
errMethodNotSupported(w, r.Method)
}
default:
http.Error(w, "route "+r.RequestURI+" not supported", http.StatusBadRequest)
errRouteNotSupported(w, r.RequestURI)
}
}