mirror of
https://github.com/go-acme/lego.git
synced 2026-01-24 20:56:25 +00:00
chore: update linter (#2785)
This commit is contained in:
committed by
GitHub
parent
b7a9b7dad0
commit
eed3f0dcc8
2
.github/workflows/pr.yml
vendored
2
.github/workflows/pr.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GO_VERSION: stable
|
||||
GOLANGCI_LINT_VERSION: v2.7.1
|
||||
GOLANGCI_LINT_VERSION: v2.8.0
|
||||
HUGO_VERSION: 0.148.2
|
||||
CGO_ENABLED: 0
|
||||
LEGO_E2E_TESTS: CI
|
||||
|
||||
@@ -53,8 +53,8 @@ func (c *Client) GetDomainByName(ctx context.Context, domainName string) (*Domai
|
||||
if err != nil {
|
||||
if statusCode == http.StatusNotFound && strings.Count(domainName, ".") > 1 {
|
||||
// Look up for the next subdomain
|
||||
subIndex := strings.Index(domainName, ".")
|
||||
return c.GetDomainByName(ctx, domainName[subIndex+1:])
|
||||
_, after, _ := strings.Cut(domainName, ".")
|
||||
return c.GetDomainByName(ctx, after)
|
||||
}
|
||||
|
||||
return nil, err
|
||||
|
||||
@@ -297,10 +297,10 @@ func (w *clientWrapper) getZone(ctx context.Context, name string) (*selectelapi.
|
||||
return nil, fmt.Errorf("zone '%s' for challenge has not been found", name)
|
||||
}
|
||||
|
||||
// -1 can not be returned since if no dots present we exit above
|
||||
i := strings.Index(name, ".")
|
||||
// after is always defined since if no dots present we exit above.
|
||||
_, after, _ := strings.Cut(name, ".")
|
||||
|
||||
return w.getZone(ctx, name[i+1:])
|
||||
return w.getZone(ctx, after)
|
||||
}
|
||||
|
||||
func (w *clientWrapper) getRRset(ctx context.Context, name, zoneID string) (*selectelapi.RRSet, error) {
|
||||
|
||||
Reference in New Issue
Block a user