mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-30 18:45:18 -04:00
chore: upgrade .golangci.yml and workflow to v2
run `golangci-lint fmt` Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
@@ -9,8 +9,9 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
"github.com/prometheus/client_golang/prometheus/testutil"
|
||||
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
)
|
||||
|
||||
func TestServerNameFromContext(t *testing.T) {
|
||||
|
||||
@@ -52,5 +52,4 @@ func TestResolveIpVersion(t *testing.T) {
|
||||
t.Errorf("resolveIpVersion(): Expected %s got %s", test.expectedIpVersion, ipVersion)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -171,6 +171,7 @@ func BenchmarkServer_LogRequest_WithTrace(b *testing.B) {
|
||||
s.logRequest(accLog, req, wrec, &duration, repl, bodyReader, false)
|
||||
}
|
||||
}
|
||||
|
||||
func TestServer_TrustedRealClientIP_NoTrustedHeaders(t *testing.T) {
|
||||
req := httptest.NewRequest("GET", "/", nil)
|
||||
req.RemoteAddr = "192.0.2.1:12345"
|
||||
|
||||
Reference in New Issue
Block a user