mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
Run gofmt -s and golint on the codebase (#2918)
* Run gofmt -s and golint on the codebase Run golint and fix everythign it flagged (except the context arg ordering), mostly edits in the rewrite plugin. Signed-off-by: Miek Gieben <miek@miek.nl> * ... and ofcourse the test as well Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -51,7 +51,7 @@ func (rw Rewrite) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
|
||||
return dns.RcodeServerFailure, fmt.Errorf("invalid name after rewrite: %s", x)
|
||||
}
|
||||
respRule := rule.GetResponseRule()
|
||||
if respRule.Active == true {
|
||||
if respRule.Active {
|
||||
wr.ResponseRewrite = true
|
||||
wr.ResponseRules = append(wr.ResponseRules, respRule)
|
||||
}
|
||||
@@ -128,7 +128,7 @@ func newRule(args ...string) (Rule, error) {
|
||||
case "edns0":
|
||||
return newEdns0Rule(mode, args[startArg:]...)
|
||||
case "ttl":
|
||||
return newTtlRule(mode, args[startArg:]...)
|
||||
return newTTLRule(mode, args[startArg:]...)
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid rule type %q", args[0])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user