mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
switch to new go-acme imports from xenolf. Fix api changes (#540)
* switch to new go-acme imports from xenolf. Fix api changes * update many vault related dependencies
This commit is contained in:
19
vendor/github.com/go-acme/lego/challenge/dns01/fqdn.go
generated
vendored
Normal file
19
vendor/github.com/go-acme/lego/challenge/dns01/fqdn.go
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
package dns01
|
||||
|
||||
// ToFqdn converts the name into a fqdn appending a trailing dot.
|
||||
func ToFqdn(name string) string {
|
||||
n := len(name)
|
||||
if n == 0 || name[n-1] == '.' {
|
||||
return name
|
||||
}
|
||||
return name + "."
|
||||
}
|
||||
|
||||
// UnFqdn converts the fqdn into a name removing the trailing dot.
|
||||
func UnFqdn(name string) string {
|
||||
n := len(name)
|
||||
if n != 0 && name[n-1] == '.' {
|
||||
return name[:n-1]
|
||||
}
|
||||
return name
|
||||
}
|
Reference in New Issue
Block a user