Skip to content

Commit

Permalink
Fix a couple of lint and fmt issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
xenolf committed Apr 7, 2016
1 parent 44d9263 commit 74c6bbe
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion providers/dns/cloudflare/cloudflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (c *DNSProvider) getHostedZoneID(fqdn string) (string, error) {
return "", err
}

result, err := c.makeRequest("GET", "/zones?name=" + acme.UnFqdn(authZone), nil)
result, err := c.makeRequest("GET", "/zones?name="+acme.UnFqdn(authZone), nil)
if err != nil {
return "", err
}
Expand Down
4 changes: 2 additions & 2 deletions providers/dns/digitalocean/digitalocean.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := acme.FindZoneByFqdn(acme.ToFqdn(domain), acme.RecursiveNameserver)
if err != nil {
return fmt.Errorf("Could not determine zone for domain: '%s'. %s", domain, err)
}
}

authZone = acme.UnFqdn(authZone)

Expand Down Expand Up @@ -125,7 +125,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := acme.FindZoneByFqdn(acme.ToFqdn(domain), acme.RecursiveNameserver)
if err != nil {
return fmt.Errorf("Could not determine zone for domain: '%s'. %s", domain, err)
}
}

authZone = acme.UnFqdn(authZone)

Expand Down
1 change: 0 additions & 1 deletion providers/dns/dnsimple/dnsimple.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ func (c *DNSProvider) getHostedZone(domain string) (string, string, error) {
return "", "", fmt.Errorf("DNSimple API call failed: %v", err)
}


authZone, err := acme.FindZoneByFqdn(domain, acme.RecursiveNameserver)
if err != nil {
return "", "", err
Expand Down
12 changes: 6 additions & 6 deletions providers/dns/route53/route53.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ func (r *DNSProvider) changeRecord(action, fqdn, value string, ttl int) error {
return err
}

statusId := resp.ChangeInfo.Id
statusID := resp.ChangeInfo.Id

return acme.WaitFor(120*time.Second, 4*time.Second, func() (bool, error) {
reqParams := &route53.GetChangeInput{
Id: statusId,
Id: statusID,
}
resp, err := r.client.GetChange(reqParams)
if err != nil {
Expand Down Expand Up @@ -144,12 +144,12 @@ func (r *DNSProvider) getHostedZoneID(fqdn string) (string, error) {
return "", fmt.Errorf("Zone %s not found in Route53 for domain %s", authZone, fqdn)
}

zoneId := *resp.HostedZones[0].Id
if strings.HasPrefix(zoneId, "/hostedzone/") {
zoneId = strings.TrimPrefix(zoneId, "/hostedzone/")
zoneID := *resp.HostedZones[0].Id
if strings.HasPrefix(zoneID, "/hostedzone/") {
zoneID = strings.TrimPrefix(zoneID, "/hostedzone/")
}

return zoneId, nil
return zoneID, nil
}

func newTXTRecordSet(fqdn, value string, ttl int) *route53.ResourceRecordSet {
Expand Down

0 comments on commit 74c6bbe

Please sign in to comment.