first commit

This commit is contained in:
William Bouzourène 2025-03-16 19:38:58 +01:00
commit 4b1861fa9b
14 changed files with 811 additions and 0 deletions

14
helpers/resolver.go Normal file
View 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 ""
}