Skip to content

Commit

Permalink
fix: go1.22 compatibility (#2295)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Oct 6, 2024
1 parent 90a0b0e commit 49dacb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
go-version: [ stable ]
go-version: [ oldstable, stable ]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand Down
6 changes: 5 additions & 1 deletion challenge/dns01/nameserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ func (cache *soaCacheEntry) isExpired() bool {

// ClearFqdnCache clears the cache of fqdn to zone mappings. Primarily used in testing.
func ClearFqdnCache() {
fqdnSoaCache.Clear()
// TODO(ldez): use `fqdnSoaCache.Clear()` when updating to go1.23
fqdnSoaCache.Range(func(k, v any) bool {
fqdnSoaCache.Delete(k)
return true
})
}

func AddDNSTimeout(timeout time.Duration) ChallengeOption {
Expand Down

0 comments on commit 49dacb2

Please sign in to comment.