1
0
Fork 0

chore: update linter

This commit is contained in:
Ludovic Fernandez 2024-02-19 15:44:03 +01:00 committed by GitHub
parent 1034646ae2
commit 88a2020817
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 139 additions and 218 deletions

View file

@ -9,6 +9,7 @@ import (
"net"
"net/http"
"reflect"
"slices"
"strings"
"sync"
"time"
@ -210,12 +211,9 @@ func (k *KerberosRoundTripper) RoundTrip(request *http.Request) (*http.Response,
}
func containsNTLMorNegotiate(h []string) bool {
for _, s := range h {
if strings.HasPrefix(s, "NTLM") || strings.HasPrefix(s, "Negotiate") {
return true
}
}
return false
return slices.ContainsFunc(h, func(s string) bool {
return strings.HasPrefix(s, "NTLM") || strings.HasPrefix(s, "Negotiate")
})
}
func createRootCACertPool(rootCAs []traefiktls.FileOrContent) *x509.CertPool {