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

@ -2,6 +2,7 @@ package acme
import (
"fmt"
"slices"
"sync"
"time"
@ -118,7 +119,7 @@ func (c *ChallengeTLSALPN) ListenConfiguration(conf dynamic.Configuration) {
c.muChans.Lock()
for _, certificate := range conf.TLS.Certificates {
if !containsACMETLS1(certificate.Stores) {
if !slices.Contains(certificate.Stores, tlsalpn01.ACMETLS1Protocol) {
continue
}
@ -161,13 +162,3 @@ func createMessage(certs map[string]*Certificate) dynamic.Message {
return conf
}
func containsACMETLS1(stores []string) bool {
for _, store := range stores {
if store == tlsalpn01.ACMETLS1Protocol {
return true
}
}
return false
}