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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user