Skip to content

Commit 29b50f5

Browse files
Cuong Manh Lecuonglm
authored andcommitted
sample: fix golangci-lint error report
1 parent f85ffb5 commit 29b50f5

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

sample/secrets.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,10 @@ func main() {
2525
println(string(blob))
2626
}
2727

28-
type credentials struct {
29-
Secret string `json:"secret"`
30-
}
31-
3228
func authenticate(rw http.ResponseWriter, req *http.Request) {
3329
secret := req.Header.Get("x-secret")
3430
if secret != "open-sesame" {
3531
http.Error(rw, "unauthorized, please set header", http.StatusUnauthorized)
3632
}
37-
rw.Write([]byte(`{"secret_location":"23.4162° N, 25.6628° E"}`))
33+
_, _ = rw.Write([]byte(`{"secret_location":"23.4162° N, 25.6628° E"}`))
3834
}

0 commit comments

Comments
 (0)