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

Revert "Make staticcheck more strict and fix new warnings"

This reverts commit 5c456e2513.
This commit is contained in:
Tom Limoncelli
2022-02-11 11:14:46 -05:00
parent a70354775e
commit f9c4887d95
16 changed files with 107 additions and 115 deletions

View File

@@ -176,8 +176,8 @@ func buildRecord(recs models.Records, domain string, id string) *dns.Record {
Rdata: []string{
fmt.Sprintf("%v", r.CaaFlag),
r.CaaTag,
r.GetTargetField(),
}})
fmt.Sprintf("%s", r.GetTargetField()),
}})
} else if r.Type == "SRV" {
rec.AddAnswer(&dns.Answer{Rdata: strings.Split(fmt.Sprintf("%d %d %d %v", r.SrvPriority, r.SrvWeight, r.SrvPort, r.GetTargetField()), " ")})
} else if r.Type == "NAPTR" {
@@ -216,8 +216,8 @@ func convert(zr *dns.ZoneRecord, domain string) ([]*models.RecordConfig, error)
}
case "CAA":
//dnscontrol expects quotes around multivalue CAA entries, API doesn't add them
xAns := strings.SplitN(ans, " ", 3)
if err := rec.SetTargetCAAStrings(xAns[0], xAns[1], xAns[2]); err != nil {
x_ans := strings.SplitN(ans, " ", 3)
if err := rec.SetTargetCAAStrings(x_ans[0], x_ans[1], x_ans[2]); err != nil {
return nil, fmt.Errorf("unparsable %s record received from ns1: %w", rtype, err)
}
default: