mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-24 07:33:03 +08:00
CHORE: Remediate staticcheck warnings (#3231)
This commit is contained in:
parent
52f62421c5
commit
9357743ee9
5 changed files with 5 additions and 4 deletions
|
@ -17,6 +17,7 @@ func hashFunc(call otto.FunctionCall) otto.Value {
|
|||
}
|
||||
algorithm := call.Argument(0).String() // The algorithm to use for hashing
|
||||
value := call.Argument(1).String() // The value to hash
|
||||
//lint:ignore SA4006 work around bug in staticcheck. This value is needed if the switch statement follows the default path.
|
||||
result := otto.Value{}
|
||||
fmt.Printf("%s\n", value)
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ func (api *autoDNSProvider) GetZoneRecordsCorrections(dc *models.DomainConfig, e
|
|||
|
||||
err := api.updateZone(domain, resourceRecords, nameServers, zoneTTL)
|
||||
if err != nil {
|
||||
return fmt.Errorf(err.Error())
|
||||
return fmt.Errorf("%s", err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -729,7 +729,7 @@ func compileAttributeErrors(err *dnsimpleapi.ErrorResponse) error {
|
|||
e := strings.Join(errors, "& ")
|
||||
message += fmt.Sprintf(": %s %s", field, e)
|
||||
}
|
||||
return fmt.Errorf(message)
|
||||
return fmt.Errorf("%s", message)
|
||||
}
|
||||
|
||||
// Return true if the string ends in one of DNSimple's name server domains
|
||||
|
|
|
@ -690,7 +690,7 @@ func (c *hednsProvider) parseResponseForDocumentAndErrors(response *http.Respons
|
|||
return true
|
||||
}
|
||||
}
|
||||
err = fmt.Errorf(element.Text())
|
||||
err = fmt.Errorf("%s", element.Text())
|
||||
return false
|
||||
})
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ func (o *oracleProvider) GetNameservers(domain string) ([]*models.Nameserver, er
|
|||
if err != nil {
|
||||
nssStrip, err := models.ToNameserversStripTD(nss)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Could not determine if trailing dots should be stripped or not...")
|
||||
return nil, fmt.Errorf("could not determine if trailing dots should be stripped or not")
|
||||
}
|
||||
|
||||
return nssStrip, nil
|
||||
|
|
Loading…
Reference in a new issue