1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Vet and Lint the entire system (#296)

* govet and golint corrections
This commit is contained in:
Tom Limoncelli
2018-01-09 12:53:16 -05:00
committed by GitHub
parent 1a91a7f536
commit b7c251190f
64 changed files with 540 additions and 433 deletions

View File

@@ -17,6 +17,7 @@ type Resolver interface {
// LiveResolver simply queries DNS to resolve SPF records.
type LiveResolver struct{}
// GetSPF looks up the SPF record named "name".
func (l LiveResolver) GetSPF(name string) (string, error) {
vals, err := net.LookupTXT(name)
if err != nil {
@@ -66,6 +67,7 @@ type cache struct {
inner Resolver
}
// NewCache creates a new cache file named filename.
func NewCache(filename string) (CachingResolver, error) {
f, err := os.Open(filename)
if err != nil {