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) {
|
func nativeToRecord(entry domain.DNSEntry, origin string) (*models.RecordConfig, error) {
|
||||||
rc := &models.RecordConfig{
|
rc := &models.RecordConfig{
|
||||||
TTL: uint32(*&entry.Expire),
|
TTL: uint32(entry.Expire),
|
||||||
Type: entry.Type,
|
Type: entry.Type,
|
||||||
Original: entry,
|
Original: entry,
|
||||||
}
|
}
|
||||||
@ -219,16 +219,6 @@ func nativeToRecord(entry domain.DNSEntry, origin string) (*models.RecordConfig,
|
|||||||
return rc, nil
|
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) {
|
func removeOtherNS(dc *models.DomainConfig) {
|
||||||
newList := make([]*models.RecordConfig, 0, len(dc.Records))
|
newList := make([]*models.RecordConfig, 0, len(dc.Records))
|
||||||
for _, rec := range dc.Records {
|
for _, rec := range dc.Records {
|
||||||
|
Reference in New Issue
Block a user