Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ linters:
- fieldalignment
# err shadowing is idiomatic and used throughout the codebase.
- shadow
revive:
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
- name: unused-parameter
severity: warning
disabled: true
staticcheck:
checks:
- all
Expand Down
1 change: 0 additions & 1 deletion bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// Package bootstrap provides a small bootstrap layer for exporters that want the
// common exporter-toolkit web flags, logging setup, landing page wiring, and
// listener startup behavior.

package bootstrap

import (
Expand Down
8 changes: 4 additions & 4 deletions web/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// protected endpoint multiple times.
func TestBasicAuthCache(t *testing.T) {
server := &http.Server{
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Handler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.Write([]byte("Hello World!"))
}),
}
Expand Down Expand Up @@ -93,7 +93,7 @@ func TestBasicAuthCache(t *testing.T) {
// to prevent user enumeration.
func TestBasicAuthWithFakepassword(t *testing.T) {
server := &http.Server{
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Handler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.Write([]byte("Hello World!"))
}),
}
Expand Down Expand Up @@ -143,7 +143,7 @@ func TestBasicAuthWithFakepassword(t *testing.T) {
// TestByPassBasicAuthVuln tests for CVE-2022-46146.
func TestByPassBasicAuthVuln(t *testing.T) {
server := &http.Server{
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Handler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.Write([]byte("Hello World!"))
}),
}
Expand Down Expand Up @@ -193,7 +193,7 @@ func TestByPassBasicAuthVuln(t *testing.T) {
// TestHTTPHeaders validates that HTTP headers are added correctly.
func TestHTTPHeaders(t *testing.T) {
server := &http.Server{
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Handler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.Write([]byte("Hello World!"))
}),
}
Expand Down
6 changes: 3 additions & 3 deletions web/tls_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ func TestConfigReloading(t *testing.T) {

server := &http.Server{
Addr: port,
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Handler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.Write([]byte("Hello World!"))
}),
}
Expand Down Expand Up @@ -479,7 +479,7 @@ func (test *TestInputs) Test(t *testing.T) {
}()

server := &http.Server{
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Handler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.Write([]byte("Hello World!"))
}),
}
Expand Down Expand Up @@ -626,7 +626,7 @@ func getTLSClient(clientCertName string) *http.Client {
caCertPool.AppendCertsFromPEM(cert)
return caCertPool
}(),
GetClientCertificate: func(req *tls.CertificateRequestInfo) (*tls.Certificate, error) {
GetClientCertificate: func(_ *tls.CertificateRequestInfo) (*tls.Certificate, error) {
return &clientCertficate, nil
},
},
Expand Down