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

Vet and Lint the entire system (#296)

* govet and golint corrections
This commit is contained in:
Tom Limoncelli
2018-01-09 12:53:16 -05:00
committed by GitHub
parent 1a91a7f536
commit b7c251190f
64 changed files with 540 additions and 433 deletions

View File

@@ -114,7 +114,7 @@ func (g *gcloud) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correc
if err != nil {
return nil, err
}
//convert to dnscontrol RecordConfig format
// convert to dnscontrol RecordConfig format
existingRecords := []*models.RecordConfig{}
oldRRs := map[key]*dns.ResourceRecordSet{}
for _, set := range rrs {
@@ -168,7 +168,7 @@ func (g *gcloud) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correc
if old, ok := oldRRs[ck]; ok {
chg.Deletions = append(chg.Deletions, old)
}
//collect records to replace with
// collect records to replace with
newRRs := &dns.ResourceRecordSet{
Name: ck.Name,
Type: ck.Type,
@@ -240,7 +240,7 @@ func (g *gcloud) EnsureDomainExists(domain string) error {
Name: strings.Replace(domain, ".", "-", -1),
Description: "zone added by dnscontrol",
}
g.zones = nil //reset cache
g.zones = nil // reset cache
_, err = g.client.ManagedZones.Create(g.project, mz).Do()
return err
}