Skip to content

Commit eed3f0d

Browse files
authored
chore: update linter (#2785)
1 parent b7a9b7d commit eed3f0d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
env:
1515
GO_VERSION: stable
16-
GOLANGCI_LINT_VERSION: v2.7.1
16+
GOLANGCI_LINT_VERSION: v2.8.0
1717
HUGO_VERSION: 0.148.2
1818
CGO_ENABLED: 0
1919
LEGO_E2E_TESTS: CI

providers/dns/internal/selectel/internal/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ func (c *Client) GetDomainByName(ctx context.Context, domainName string) (*Domai
5353
if err != nil {
5454
if statusCode == http.StatusNotFound && strings.Count(domainName, ".") > 1 {
5555
// Look up for the next subdomain
56-
subIndex := strings.Index(domainName, ".")
57-
return c.GetDomainByName(ctx, domainName[subIndex+1:])
56+
_, after, _ := strings.Cut(domainName, ".")
57+
return c.GetDomainByName(ctx, after)
5858
}
5959

6060
return nil, err

providers/dns/selectelv2/selectelv2.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,10 @@ func (w *clientWrapper) getZone(ctx context.Context, name string) (*selectelapi.
297297
return nil, fmt.Errorf("zone '%s' for challenge has not been found", name)
298298
}
299299

300-
// -1 can not be returned since if no dots present we exit above
301-
i := strings.Index(name, ".")
300+
// after is always defined since if no dots present we exit above.
301+
_, after, _ := strings.Cut(name, ".")
302302

303-
return w.getZone(ctx, name[i+1:])
303+
return w.getZone(ctx, after)
304304
}
305305

306306
func (w *clientWrapper) getRRset(ctx context.Context, name, zoneID string) (*selectelapi.RRSet, error) {

0 commit comments

Comments
 (0)