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

Lint: Fix ST1005: error strings should not be capitalized (#834)

This commit is contained in:
Tom Limoncelli
2020-08-30 19:52:37 -04:00
committed by GitHub
parent ca136992f8
commit de308c0952
37 changed files with 98 additions and 94 deletions

View File

@@ -57,7 +57,7 @@ var defaultNS = []string{
func NewProvider(m map[string]string, metadata json.RawMessage) (providers.DNSServiceProvider, error) {
token := m["token"]
if token == "" {
return nil, fmt.Errorf("Vultr API token is required")
return nil, fmt.Errorf("missing Vultr API token")
}
client := govultr.NewClient(nil, token)
@@ -200,7 +200,7 @@ func toRecordConfig(domain string, r *govultr.DNSRecord) (*models.RecordConfig,
case "TXT":
// Remove quotes if it is a TXT record.
if !strings.HasPrefix(data, `"`) || !strings.HasSuffix(data, `"`) {
return nil, errors.New("Unexpected lack of quotes in TXT record from Vultr")
return nil, errors.New("unexpected lack of quotes in TXT record from Vultr")
}
return rc, rc.SetTargetTXT(data[1 : len(data)-1])
default: