Skip to content

Commit

Permalink
refactor: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
igoogolx committed Jun 15, 2024
1 parent 757f1a9 commit 9143b60
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/cfg/distribution/ruleEngine/builtIn.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type builtIn struct {
}

func (p builtIn) GetPolicy() constants.Policy {
return constants.Policy(p.Policy)
return p.Policy
}

func (p builtIn) Type() constants.RuleType {
Expand Down
2 changes: 1 addition & 1 deletion internal/cfg/distribution/ruleEngine/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (d Domain) GetPolicy() constants.Policy {
}

func (d Domain) Type() constants.RuleType {
return constants.RuleDomain
return d.RuleType
}

func (d Domain) Match(value string) bool {
Expand Down
4 changes: 2 additions & 2 deletions internal/cfg/distribution/ruleEngine/ipcidr.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ type IpCidr struct {
Policy constants.Policy `json:"policy"`
}

func (d IpCidr) GetPolicy() constants.Policy {
return constants.Policy(d.Policy)
func (i IpCidr) GetPolicy() constants.Policy {
return i.Policy
}

func (i IpCidr) Type() constants.RuleType {
Expand Down

0 comments on commit 9143b60

Please sign in to comment.