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

TRANSIP: Fix staticcheck errors (#1337)

This commit is contained in:
Vincent Hagen
2021-12-14 21:47:38 +01:00
committed by GitHub
parent 7ae27aa0b9
commit cc6638fb95

View File

@ -207,7 +207,7 @@ func recordToNative(config *models.RecordConfig) (domain.DNSEntry, error) {
func nativeToRecord(entry domain.DNSEntry, origin string) (*models.RecordConfig, error) {
rc := &models.RecordConfig{
TTL: uint32(*&entry.Expire),
TTL: uint32(entry.Expire),
Type: entry.Type,
Original: entry,
}
@ -219,16 +219,6 @@ func nativeToRecord(entry domain.DNSEntry, origin string) (*models.RecordConfig,
return rc, nil
}
func removeNS(records models.Records) models.Records {
var noNameServers models.Records
for _, r := range records {
if r.Type != "NS" {
noNameServers = append(noNameServers, r)
}
}
return noNameServers
}
func removeOtherNS(dc *models.DomainConfig) {
newList := make([]*models.RecordConfig, 0, len(dc.Records))
for _, rec := range dc.Records {