Skip to content

Commit e325e01

Browse files
committed
style: fix names in errors and remove/clarify FIXMEs
1 parent 1978a22 commit e325e01

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

cmd/cyclonus/pkg/connectivity/stepresult.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ type StepResult struct {
1313
KubeProbes []*probe.Table
1414
Policy *matcher.Policy
1515
KubePolicies []*networkingv1.NetworkPolicy
16-
// FIXME use ANP and BANP here
1716
ANPs []*v1alpha1.AdminNetworkPolicy
1817
BANP *v1alpha1.BaselineAdminNetworkPolicy
1918
comparisons []*ComparisonTable

cmd/cyclonus/pkg/matcher/builder.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func BuildTarget(netpol *networkingv1.NetworkPolicy) (*Target, *Target) {
5858
var ingress *Target
5959
var egress *Target
6060
if len(netpol.Spec.PolicyTypes) == 0 {
61-
panic(errors.Errorf("invalid network policy: need at least 1 type"))
61+
panic(errors.Errorf("invalid NetworkPolicy: need at least 1 type"))
6262
}
6363
policyNamespace := getPolicyNamespace(netpol)
6464
for _, pType := range netpol.Spec.PolicyTypes {
@@ -208,7 +208,7 @@ func BuildSinglePortMatcher(npPort networkingv1.NetworkPolicyPort) (*PortProtoco
208208

209209
func BuildTargetANP(anp *v1alpha1.AdminNetworkPolicy) (*Target, *Target) {
210210
if len(anp.Spec.Ingress) == 0 && len(anp.Spec.Egress) == 0 {
211-
panic(errors.Errorf("invalid network policy: need at least one egress or ingress rule"))
211+
panic(errors.Errorf("invalid AdminNetworkPolicy: need at least one egress or ingress rule"))
212212
}
213213

214214
var ingress *Target
@@ -251,7 +251,7 @@ func BuildTargetANP(anp *v1alpha1.AdminNetworkPolicy) (*Target, *Target) {
251251

252252
func BuildTargetBANP(banp *v1alpha1.BaselineAdminNetworkPolicy) (*Target, *Target) {
253253
if len(banp.Spec.Ingress) == 0 && len(banp.Spec.Egress) == 0 {
254-
panic(errors.Errorf("invalid network policy: need at least one egress or ingress rule"))
254+
panic(errors.Errorf("invalid BaselineAdminNetworkPolicy: need at least one egress or ingress rule"))
255255
}
256256

257257
var ingress *Target

cmd/cyclonus/pkg/matcher/explain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (s *SliceBuilder) IPPeerMatcherTableLines(ip *IPPeerMatcher) {
8989
}
9090

9191
func (s *SliceBuilder) PodPeerMatcherTableLines(nsPodMatcher *PodPeerMatcher, e Effect) {
92-
// FIXME add action/priority column using e
92+
// FIXME add action/priority column using fields of the Effect parameter "e"
9393
var namespaces string
9494
switch ns := nsPodMatcher.Namespace.(type) {
9595
case *AllNamespaceMatcher:

0 commit comments

Comments
 (0)