first commit
This commit is contained in:
commit
4b1861fa9b
14 changed files with 811 additions and 0 deletions
14
helpers/resolver.go
Normal file
14
helpers/resolver.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package helpers
|
||||
|
||||
import (
|
||||
"github.com/domainr/dnsr"
|
||||
)
|
||||
|
||||
func ResolveRecord(recordName, recordType string) string {
|
||||
r := dnsr.NewResolver(dnsr.WithCache(0))
|
||||
for _, rr := range r.Resolve(recordName, recordType) {
|
||||
return rr.Value
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue