1
0
Fork 0

chore: update linter

This commit is contained in:
Ludovic Fernandez 2024-11-12 10:56:06 +01:00 committed by GitHub
parent 9c50129520
commit f437fb4230
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 796 additions and 830 deletions

View file

@ -58,7 +58,7 @@ func Test_defaultRule(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -112,7 +112,7 @@ func Test_defaultRule(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -157,7 +157,7 @@ func Test_defaultRule(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -208,7 +208,7 @@ func Test_defaultRule(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -282,7 +282,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -345,7 +345,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://192.168.1.101:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
"Test2": {
@ -355,7 +355,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://192.168.1.102:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -418,7 +418,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.2:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -478,7 +478,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.2:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -541,7 +541,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.2:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -593,7 +593,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -646,7 +646,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -691,7 +691,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -749,7 +749,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -797,7 +797,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
"Service2": {
@ -807,7 +807,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -984,7 +984,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.2:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -1035,7 +1035,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -1113,7 +1113,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.2:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -1178,7 +1178,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.2:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -1237,7 +1237,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.2:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -1301,7 +1301,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.2:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -1353,7 +1353,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -1406,7 +1406,7 @@ func Test_buildConfig(t *testing.T) {
URL: "h2c://127.0.0.1:8080",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -1453,7 +1453,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
"Service2": {
@ -1463,7 +1463,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:8080",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -1654,7 +1654,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -1717,7 +1717,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -1768,7 +1768,7 @@ func Test_buildConfig(t *testing.T) {
Address: "127.0.0.1:9999",
},
},
TerminationDelay: Int(100),
TerminationDelay: pointer(100),
},
},
},
@ -1821,7 +1821,7 @@ func Test_buildConfig(t *testing.T) {
Address: "127.0.0.1:9999",
},
},
TerminationDelay: Int(100),
TerminationDelay: pointer(100),
},
},
},
@ -1917,7 +1917,7 @@ func Test_buildConfig(t *testing.T) {
Address: "127.0.0.1:9999",
},
},
TerminationDelay: Int(100),
TerminationDelay: pointer(100),
},
},
},
@ -1973,7 +1973,7 @@ func Test_buildConfig(t *testing.T) {
Address: "127.0.0.1:80",
},
},
TerminationDelay: Int(100),
TerminationDelay: pointer(100),
},
},
},
@ -2095,7 +2095,7 @@ func Test_buildConfig(t *testing.T) {
Address: "127.0.0.2:80",
},
},
TerminationDelay: Int(100),
TerminationDelay: pointer(100),
},
},
},
@ -2124,7 +2124,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.2:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -2211,7 +2211,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.2:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -2248,7 +2248,7 @@ func Test_buildConfig(t *testing.T) {
Address: "127.0.0.1:80",
},
},
TerminationDelay: Int(100),
TerminationDelay: pointer(100),
},
},
},
@ -2340,7 +2340,7 @@ func Test_buildConfig(t *testing.T) {
Address: "127.0.0.1:80",
},
},
TerminationDelay: Int(200),
TerminationDelay: pointer(200),
},
},
},
@ -2423,7 +2423,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:80",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
"Test-1234154071633021619": {
@ -2433,7 +2433,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.2:80",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -2497,7 +2497,7 @@ func Test_buildConfig(t *testing.T) {
Servers: []dynamic.TCPServer{
{Address: "127.0.0.1:80"},
},
TerminationDelay: Int(100),
TerminationDelay: pointer(100),
},
},
"Test-8769860286750522282": {
@ -2505,7 +2505,7 @@ func Test_buildConfig(t *testing.T) {
Servers: []dynamic.TCPServer{
{Address: "127.0.0.2:80"},
},
TerminationDelay: Int(100),
TerminationDelay: pointer(100),
},
},
},
@ -2648,7 +2648,7 @@ func Test_buildConfig(t *testing.T) {
URL: "http://127.0.0.1:9999",
},
},
PassHostHeader: Bool(true),
PassHostHeader: pointer(true),
},
},
},
@ -2786,5 +2786,4 @@ func extractNamespacesFromProvider(providers []*Provider) []string {
return res
}
func Int(v int) *int { return &v }
func Bool(v bool) *bool { return &v }
func pointer[T any](v T) *T { return &v }