14 lines
248 B
Go
14 lines
248 B
Go
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 ""
|
|
}
|