From 1bdab236ea5b62716bff6c549fb38e426dd59615 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 2 Sep 2020 02:47:48 +0200 Subject: [PATCH] feat: removes AddPreCheck function. --- challenge/dns01/precheck.go | 17 ----------------- 1 file changed, 17 deletions(-) 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