summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Kuznetsov <evgeny@kuznetsov.md>2023-03-23 20:23:59 +0300
committerEvgeny Kuznetsov <evgeny@kuznetsov.md>2023-03-23 20:23:59 +0300
commit93acbe74a992c4cb83676301e084575bd4fe76e5 (patch)
treeb30dbea8da6b15301f4d89384b8505abed1e0edd
parente1e1498c97c929821c3b84ff7dd1753fe3180ce4 (diff)
downloadstatic-wm-93acbe74a992c4cb83676301e084575bd4fe76e5.tar.gz
static-wm-93acbe74a992c4cb83676301e084575bd4fe76e5.zip
chore: satisfy linters
-rw-r--r--main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go
index 366ebde..e2f64c4 100644
--- a/main.go
+++ b/main.go
@@ -29,18 +29,18 @@ func (ep endpoint) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if source.Scheme != "http" && source.Scheme != "https" {
w.WriteHeader(http.StatusBadRequest)
- w.Write([]byte(errInvalidScheme))
+ _, _ = w.Write([]byte(errInvalidScheme))
return
}
target, err := url.Parse(r.PostFormValue("target"))
if err != nil || !ep.targetAllowed(target) {
w.WriteHeader(http.StatusBadRequest)
- w.Write([]byte(errTgtNotAccepted))
+ _, _ = w.Write([]byte(errTgtNotAccepted))
return
}
if target.Scheme != "http" && target.Scheme != "https" {
w.WriteHeader(http.StatusBadRequest)
- w.Write([]byte(errInvalidScheme))
+ _, _ = w.Write([]byte(errInvalidScheme))
return
}
}