chore: fix warnings (#3990)
This commit is contained in:
@@ -60,7 +60,8 @@ func executeCallbacks(w http.ResponseWriter, r *http.Request, next http.Handler,
|
||||
}
|
||||
}
|
||||
|
||||
func handleVerificationFailure(w http.ResponseWriter, r *http.Request, next http.Handler, strict bool, code int) {
|
||||
func handleVerificationFailure(w http.ResponseWriter, r *http.Request, next http.Handler,
|
||||
strict bool, _ int) {
|
||||
if strict {
|
||||
w.WriteHeader(http.StatusForbidden)
|
||||
} else {
|
||||
|
||||
@@ -327,7 +327,7 @@ func buildRequest(rs requestSettings) (*http.Request, error) {
|
||||
query,
|
||||
bodySign,
|
||||
}, "\n")
|
||||
rs.signature = codec.HmacBase64([]byte(key), contentOfSign)
|
||||
rs.signature = codec.HmacBase64(key, contentOfSign)
|
||||
}
|
||||
|
||||
var mode string
|
||||
|
||||
@@ -224,7 +224,7 @@ func (m flushableResponseWriter) Write(p []byte) (int, error) {
|
||||
return m.writer.Write(p)
|
||||
}
|
||||
|
||||
func (m flushableResponseWriter) WriteHeader(statusCode int) {
|
||||
func (m flushableResponseWriter) WriteHeader(_ int) {
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
@@ -240,6 +240,6 @@ func (t *halfWriter) Write(p []byte) (n int, err error) {
|
||||
type badWriter struct {
|
||||
}
|
||||
|
||||
func (b *badWriter) Write(p []byte) (n int, err error) {
|
||||
func (b *badWriter) Write(_ []byte) (n int, err error) {
|
||||
return 0, io.ErrClosedPipe
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ type mockedReadCloser struct {
|
||||
errMsg string
|
||||
}
|
||||
|
||||
func (m mockedReadCloser) Read(p []byte) (n int, err error) {
|
||||
func (m mockedReadCloser) Read(_ []byte) (n int, err error) {
|
||||
return 0, errors.New(m.errMsg)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user