chore: update linter (#2785)

This commit is contained in:
Ludovic Fernandez
2026-01-08 17:33:57 +01:00
committed by GitHub
parent b7a9b7dad0
commit eed3f0dcc8
3 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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) {