mirror of
https://github.com/coredns/coredns.git
synced 2025-12-07 19:05:19 -05:00
cleanup: go vet and golint run (#736)
* cleanup: go vet and golint run Various cleanups trickered by go vet and golint. * Fix tests and lowercase all errors Lowercase all errors, some tests in kubernetes use errors from kubernetes which do start with a capital letter.
This commit is contained in:
@@ -23,7 +23,7 @@ const (
|
||||
)
|
||||
|
||||
func operatorError(operator string) error {
|
||||
return fmt.Errorf("Invalid operator %v", operator)
|
||||
return fmt.Errorf("invalid operator %v", operator)
|
||||
}
|
||||
|
||||
func newReplacer(r *dns.Msg) replacer.Replacer {
|
||||
|
||||
@@ -94,7 +94,7 @@ func (rule *edns0LocalRule) Rewrite(r *dns.Msg) Result {
|
||||
// newEdns0Rule creates an EDNS0 rule of the appropriate type based on the args
|
||||
func newEdns0Rule(args ...string) (Rule, error) {
|
||||
if len(args) < 2 {
|
||||
return nil, fmt.Errorf("Too few arguments for an EDNS0 rule")
|
||||
return nil, fmt.Errorf("too few arguments for an EDNS0 rule")
|
||||
}
|
||||
|
||||
ruleType := strings.ToLower(args[0])
|
||||
|
||||
@@ -64,7 +64,7 @@ type Rule interface {
|
||||
|
||||
func newRule(args ...string) (Rule, error) {
|
||||
if len(args) == 0 {
|
||||
return nil, fmt.Errorf("No rule type specified for rewrite")
|
||||
return nil, fmt.Errorf("no rule type specified for rewrite")
|
||||
}
|
||||
|
||||
ruleType := strings.ToLower(args[0])
|
||||
|
||||
Reference in New Issue
Block a user