1
0
mirror of https://github.com/go-acme/lego.git synced 2025-01-10 18:53:06 +02:00

chore: update linter (#1767)

Co-authored-by: Dominik Menke <git@dmke.org>
This commit is contained in:
Ludovic Fernandez 2022-11-27 20:04:28 +01:00 committed by GitHub
parent 2431f83100
commit a7b11e0447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 7 deletions

View File

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
GO_VERSION: 1.19 GO_VERSION: 1.19
GOLANGCI_LINT_VERSION: v1.49.0 GOLANGCI_LINT_VERSION: v1.50.1
HUGO_VERSION: 0.54.0 HUGO_VERSION: 0.54.0
CGO_ENABLED: 0 CGO_ENABLED: 0
LEGO_E2E_TESTS: CI LEGO_E2E_TESTS: CI

View File

@ -204,3 +204,7 @@
[[issues.exclude-rules]] [[issues.exclude-rules]]
path = "providers/dns/sakuracloud/client.go" path = "providers/dns/sakuracloud/client.go"
text = "mu is a global variable" text = "mu is a global variable"
[[issues.exclude-rules]]
path = "providers/dns/hosttech/internal/client_test.go"
text = "Duplicate words \\(0\\) found"

View File

@ -53,7 +53,7 @@ func (c *SolverManager) SetDNS01Provider(p challenge.Provider, opts ...dns01.Cha
return nil return nil
} }
// Remove Remove a challenge type from the available solvers. // Remove removes a challenge type from the available solvers.
func (c *SolverManager) Remove(chlgType challenge.Type) { func (c *SolverManager) Remove(chlgType challenge.Type) {
delete(c.solvers, chlgType) delete(c.solvers, chlgType)
} }

View File

@ -65,7 +65,7 @@ func (t *TokenTransport) Client() *http.Client {
return &http.Client{Transport: t} return &http.Client{Transport: t}
} }
// Wrap Wrap a HTTP client Transport with the TokenTransport. // Wrap wraps an HTTP client Transport with the TokenTransport.
func (t *TokenTransport) Wrap(client *http.Client) *http.Client { func (t *TokenTransport) Wrap(client *http.Client) *http.Client {
backup := client.Transport backup := client.Transport
t.Transport = backup t.Transport = backup

View File

@ -54,7 +54,7 @@ func (t *TokenTransport) Client() *http.Client {
return &http.Client{Transport: t} return &http.Client{Transport: t}
} }
// Wrap Wrap a HTTP client Transport with the TokenTransport. // Wrap wraps an HTTP client Transport with the TokenTransport.
func (t *TokenTransport) Wrap(client *http.Client) *http.Client { func (t *TokenTransport) Wrap(client *http.Client) *http.Client {
backup := client.Transport backup := client.Transport
t.Transport = backup t.Transport = backup

View File

@ -167,21 +167,21 @@ func TestSplitDomain(t *testing.T) {
expectedZone: "domain.com", expectedZone: "domain.com",
}, },
{ {
desc: "with a sub domain", desc: "with a subdomain",
domain: "my.domain.com", domain: "my.domain.com",
zones: []string{"domain.com"}, zones: []string{"domain.com"},
expectedOwner: "_acme-challenge.my", expectedOwner: "_acme-challenge.my",
expectedZone: "domain.com", expectedZone: "domain.com",
}, },
{ {
desc: "with a sub domain in a zone", desc: "with a subdomain in a zone",
domain: "my.sub.domain.com", domain: "my.sub.domain.com",
zones: []string{"sub.domain.com", "domain.com"}, zones: []string{"sub.domain.com", "domain.com"},
expectedOwner: "_acme-challenge.my", expectedOwner: "_acme-challenge.my",
expectedZone: "sub.domain.com", expectedZone: "sub.domain.com",
}, },
{ {
desc: "with a sub sub domain", desc: "with a sub-subdomain",
domain: "my.sub.domain.com", domain: "my.sub.domain.com",
zones: []string{"domain1.com", "domain.com"}, zones: []string{"domain1.com", "domain.com"},
expectedOwner: "_acme-challenge.my.sub", expectedOwner: "_acme-challenge.my.sub",