oracle: fix nameserver trailing dot issue, and resolve staticcheck warnings (#1341)

* fix nameserver trailing dot issue, and resolve staticcheck warnings

* ToNameservers

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Nick Gregory 2021-12-29 12:06:44 -05:00 committed by GitHub
parent d4956c225c
commit 9a915db5b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,7 +146,7 @@ func (o *oracleProvider) GetNameservers(domain string) ([]*models.Nameserver, er
nss[i] = *ns.Hostname
}
return models.ToNameserversStripTD(nss)
return models.ToNameservers(nss)
}
func (o *oracleProvider) GetZoneRecords(domain string) (models.Records, error) {
@ -224,12 +224,9 @@ func (o *oracleProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*model
models.PostProcessRecords(existingRecords)
txtutil.SplitSingleLongTxt(dc.Records) // Autosplit long TXT records
filteredNewRecords := models.Records{}
// Ensure we don't emit changes for attempted modification of built-in apex NSs
for _, rec := range dc.Records {
if rec.Type != "NS" {
filteredNewRecords = append(filteredNewRecords, rec)
continue
}
@ -243,7 +240,6 @@ func (o *oracleProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*model
printer.Warnf("Oracle Cloud forces TTL=86400 for NS records. Ignoring configured TTL of %d for %s\n", rec.TTL, recNS)
rec.TTL = 86400
}
filteredNewRecords = append(filteredNewRecords, rec)
}
differ := diff.New(dc)