mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-29 01:18:48 +02:00
refactor: remove unused StopOnFirstMatch field from MatchingConfig
Remove StopOnFirstMatch field that was defined but never used in the actual matching logic. The current implementation always evaluates all rule types and applies a fixed precedence (Domain > MAC > Network), making the StopOnFirstMatch field unnecessary. Changes: - Remove StopOnFirstMatch from MatchingConfig structs - Update DefaultMatchingConfig() function - Update all test cases and references - Simplify configuration to only include Order field This cleanup removes dead code and simplifies the configuration API without changing any functional behavior.
This commit is contained in:
@@ -41,15 +41,13 @@ type MatchResult struct {
|
||||
|
||||
// MatchingConfig defines the configuration for rule matching behavior
|
||||
type MatchingConfig struct {
|
||||
Order []RuleType `json:"order" yaml:"order"`
|
||||
StopOnFirstMatch bool `json:"stop_on_first_match" yaml:"stop_on_first_match"`
|
||||
Order []RuleType `json:"order" yaml:"order"`
|
||||
}
|
||||
|
||||
// DefaultMatchingConfig returns the default matching configuration
|
||||
// This maintains backward compatibility with the current behavior
|
||||
func DefaultMatchingConfig() *MatchingConfig {
|
||||
return &MatchingConfig{
|
||||
Order: []RuleType{RuleTypeNetwork, RuleTypeMac, RuleTypeDomain},
|
||||
StopOnFirstMatch: true,
|
||||
Order: []RuleType{RuleTypeNetwork, RuleTypeMac, RuleTypeDomain},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user