fix: enable usestdlibvars linter

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2024-10-21 08:14:24 +02:00
parent 4ad9261194
commit 86c6b5f2da
16 changed files with 50 additions and 44 deletions

View File

@ -436,7 +436,7 @@ func (ac *accessController) ServeHTTP(rw http.ResponseWriter, req *http.Request)
addCORSHeader(rw, origin)
}
if req.Method == "OPTIONS" {
if req.Method == http.MethodOptions {
rw.WriteHeader(http.StatusOK)
return
}
@ -486,7 +486,7 @@ func (ch *corsHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
addCORSHeader(rw, origin)
}
if req.Method == "OPTIONS" {
if req.Method == http.MethodOptions {
rw.WriteHeader(http.StatusOK)
return
}