1
0
mirror of https://github.com/go-acme/lego.git synced 2024-11-29 01:42:09 +02:00

chore: update golangci-lint.

This commit is contained in:
Fernandez Ludovic 2019-02-16 14:56:15 +01:00
parent d891600a89
commit a8b2397631
3 changed files with 5 additions and 8 deletions

View File

@ -30,7 +30,7 @@ before_install:
- go get -u github.com/letsencrypt/pebble/...
# Install linters and misspell
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.13.2
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.14.0
- golangci-lint --version
install:

View File

@ -106,7 +106,7 @@ func handleTOS(ctx *cli.Context, client *lego.Client) bool {
case "", "y", "Y":
return true
case "n", "N":
log.Fatal("You did not accept the TOS. Unable to proceed.")
return false
default:
fmt.Println("Your input was invalid. Please answer with one of Y/y, n/N or by pressing enter.")
}

View File

@ -101,10 +101,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
return fmt.Errorf("sakuracloud: %v", err)
}
records, err := d.findTxtRecords(fqdn, zone)
if err != nil {
return fmt.Errorf("sakuracloud: %v", err)
}
records := d.findTxtRecords(fqdn, zone)
for _, record := range records {
var updRecords []sacloud.DNSRecordSet
@ -155,7 +152,7 @@ func (d *DNSProvider) getHostedZone(domain string) (*sacloud.DNS, error) {
return nil, fmt.Errorf("zone %s not found", zoneName)
}
func (d *DNSProvider) findTxtRecords(fqdn string, zone *sacloud.DNS) ([]sacloud.DNSRecordSet, error) {
func (d *DNSProvider) findTxtRecords(fqdn string, zone *sacloud.DNS) []sacloud.DNSRecordSet {
recordName := d.extractRecordName(fqdn, zone.Name)
var res []sacloud.DNSRecordSet
@ -164,7 +161,7 @@ func (d *DNSProvider) findTxtRecords(fqdn string, zone *sacloud.DNS) ([]sacloud.
res = append(res, record)
}
}
return res, nil
return res
}
func (d *DNSProvider) extractRecordName(fqdn, domain string) string {