Skip to content

Commit 8d0aa6b

Browse files
committed
CR RuleIndx -> RuleIndex.
1 parent e5640d2 commit 8d0aa6b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/linter/lintFilterRuleSplitSubnet.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (finding *splitRuleSubnet) string() string {
107107
subnetStr = "subnet " + subnetStr
108108
}
109109
return fmt.Sprintf("In VPC %s, %s %s rule's indexed %d splits %s. Splitting rule details: %s",
110-
finding.vpc(), finding.rule.LayerName, rule.FilterName, rule.RuleIndx, subnetStr, rule.RuleDesc)
110+
finding.vpc(), finding.rule.LayerName, rule.FilterName, rule.RuleIndex, subnetStr, rule.RuleDesc)
111111
}
112112

113113
// for json: a rule with the list of subnets it splits
@@ -129,7 +129,7 @@ func (finding *splitRuleSubnet) toJSON() any {
129129
splitSubnetsJSON[i] = subnetJSON{Name: splitSubnet.Name(), CIDR: splitSubnet.CIDR()}
130130
}
131131
res := splitRuleSubnetJSON{VpcName: finding.vpcName, Rule: vpcmodel.RuleOfFilter{LayerName: rule.LayerName,
132-
FilterName: rule.FilterName, RuleIndx: rule.RuleIndx, RuleDesc: rule.RuleDesc},
132+
FilterName: rule.FilterName, RuleIndex: rule.RuleIndex, RuleDesc: rule.RuleDesc},
133133
SplitSubnets: splitSubnetsJSON}
134134
return res
135135
}

pkg/vpcmodel/abstractVPC.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,13 @@ type RulesInTable struct {
250250
type RuleOfFilter struct {
251251
LayerName string `json:"layer"`
252252
FilterName string `json:"table"`
253-
RuleIndx int `json:"rule_index"`
253+
RuleIndex int `json:"rule_index"`
254254
RuleDesc string `json:"rule_description"`
255255
IPBlocks []*ipblock.IPBlock `json:"ip_blocks,omitempty"` // CIDR/IPBlocks referenced by the rule (src/dst/local...)
256256
}
257257

258258
func NewRuleOfFilter(layerName, filterName, desc string, ruleIndex int, ipBlocks []*ipblock.IPBlock) *RuleOfFilter {
259-
return &RuleOfFilter{LayerName: layerName, FilterName: filterName, RuleIndx: ruleIndex, RuleDesc: desc,
259+
return &RuleOfFilter{LayerName: layerName, FilterName: filterName, RuleIndex: ruleIndex, RuleDesc: desc,
260260
IPBlocks: ipBlocks}
261261
}
262262

0 commit comments

Comments
 (0)