1
0
mirror of https://github.com/go-acme/lego.git synced 2025-01-03 15:23:32 +02:00

fix: go1.22 compatibility (#2295)

This commit is contained in:
Ludovic Fernandez 2024-10-06 20:01:31 +02:00 committed by GitHub
parent 90a0b0e1e4
commit 49dacb2db1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -16,7 +16,7 @@ jobs:
strategy: strategy:
matrix: matrix:
go-version: [ stable ] go-version: [ oldstable, stable ]
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
steps: steps:

View File

@ -48,7 +48,11 @@ func (cache *soaCacheEntry) isExpired() bool {
// ClearFqdnCache clears the cache of fqdn to zone mappings. Primarily used in testing. // ClearFqdnCache clears the cache of fqdn to zone mappings. Primarily used in testing.
func ClearFqdnCache() { 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 { func AddDNSTimeout(timeout time.Duration) ChallengeOption {