Skip to content

Commit

Permalink
CHORE: Fix staticcheck errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tlimoncelli committed Dec 9, 2024
1 parent 8368123 commit e067a08
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions pkg/js/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion providers/autodns/autoDnsProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion providers/dnsimple/dnsimpleProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion providers/hedns/hednsProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})

Expand Down
2 changes: 1 addition & 1 deletion providers/oracle/oracleProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e067a08

Please sign in to comment.