forked from TrueCloudLab/lego
chore: update golangci-lint.
This commit is contained in:
parent
d891600a89
commit
a8b2397631
3 changed files with 5 additions and 8 deletions
|
@ -30,7 +30,7 @@ before_install:
|
||||||
- go get -u github.com/letsencrypt/pebble/...
|
- go get -u github.com/letsencrypt/pebble/...
|
||||||
|
|
||||||
# Install linters and misspell
|
# 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
|
- golangci-lint --version
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
|
|
@ -106,7 +106,7 @@ func handleTOS(ctx *cli.Context, client *lego.Client) bool {
|
||||||
case "", "y", "Y":
|
case "", "y", "Y":
|
||||||
return true
|
return true
|
||||||
case "n", "N":
|
case "n", "N":
|
||||||
log.Fatal("You did not accept the TOS. Unable to proceed.")
|
return false
|
||||||
default:
|
default:
|
||||||
fmt.Println("Your input was invalid. Please answer with one of Y/y, n/N or by pressing enter.")
|
fmt.Println("Your input was invalid. Please answer with one of Y/y, n/N or by pressing enter.")
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,10 +101,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
|
||||||
return fmt.Errorf("sakuracloud: %v", err)
|
return fmt.Errorf("sakuracloud: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
records, err := d.findTxtRecords(fqdn, zone)
|
records := d.findTxtRecords(fqdn, zone)
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("sakuracloud: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, record := range records {
|
for _, record := range records {
|
||||||
var updRecords []sacloud.DNSRecordSet
|
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)
|
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)
|
recordName := d.extractRecordName(fqdn, zone.Name)
|
||||||
|
|
||||||
var res []sacloud.DNSRecordSet
|
var res []sacloud.DNSRecordSet
|
||||||
|
@ -164,7 +161,7 @@ func (d *DNSProvider) findTxtRecords(fqdn string, zone *sacloud.DNS) ([]sacloud.
|
||||||
res = append(res, record)
|
res = append(res, record)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res, nil
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *DNSProvider) extractRecordName(fqdn, domain string) string {
|
func (d *DNSProvider) extractRecordName(fqdn, domain string) string {
|
||||||
|
|
Loading…
Reference in a new issue