diff --git a/challenge/dns01/precheck.go b/challenge/dns01/precheck.go index 00e09854..f65dfb5a 100644 --- a/challenge/dns01/precheck.go +++ b/challenge/dns01/precheck.go @@ -1,7 +1,6 @@ package dns01 import ( - "errors" "fmt" "net" "strings" @@ -24,22 +23,6 @@ func WrapPreCheck(wrap WrapPreCheckFunc) ChallengeOption { } } -// AddPreCheck Allow to define checks before notifying ACME that the DNS challenge is ready. -// Deprecated: use WrapPreCheck instead. -func AddPreCheck(preCheck PreCheckFunc) ChallengeOption { - // Prevent race condition - check := preCheck - return func(chlg *Challenge) error { - chlg.preCheck.checkFunc = func(_, fqdn, value string, _ PreCheckFunc) (bool, error) { - if check == nil { - return false, errors.New("invalid preCheck: preCheck is nil") - } - return check(fqdn, value) - } - return nil - } -} - func DisableCompletePropagationRequirement() ChallengeOption { return func(chlg *Challenge) error { chlg.preCheck.requireCompletePropagation = false