Remove some duplicate worlds (#2582)

Signed-off-by: Nguyen Phuong An <AnNP@vn.fujitsu.com>
This commit is contained in:
Nguyen Phuong An
2019-02-20 19:12:21 +07:00
committed by Paul G
parent 3c23aac2d3
commit e78d9a7893
9 changed files with 9 additions and 9 deletions

View File

@@ -29,7 +29,7 @@ func newClassRule(nextAction string, args ...string) (Rule, error) {
return &classRule{from, to, nextAction}, nil
}
// Rewrite rewrites the the current request.
// Rewrite rewrites the current request.
func (rule *classRule) Rewrite(ctx context.Context, state request.Request) Result {
if rule.fromClass > 0 && rule.toClass > 0 {
if state.Req.Question[0].Qclass == rule.fromClass {

View File

@@ -30,7 +30,7 @@ func newTypeRule(nextAction string, args ...string) (Rule, error) {
return &typeRule{from, to, nextAction}, nil
}
// Rewrite rewrites the the current request.
// Rewrite rewrites the current request.
func (rule *typeRule) Rewrite(ctx context.Context, state request.Request) Result {
if rule.fromType > 0 && rule.toType > 0 {
if state.QType() == rule.fromType {