Skip to content

Commit fbc02b3

Browse files
committed
fixed lint
1 parent b29454d commit fbc02b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cns/middlewares/k8sSwiftV2_windows.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ func (k *K8sSWIFTv2Middleware) addDefaultRoute(podIPInfo *cns.PodIpInfo, gwIP st
6767
}
6868

6969
// get policy of type endpoint policy given the params
70-
func getEndpointPolicy(policyType, action, direction string, priority int) (policy.Policy, error) {
71-
endpointPolicy, err := createEndpointPolicy(policyType, action, direction, priority)
70+
func getEndpointPolicy(policyType policy.CNIPolicyType, action, direction string, priority int) (policy.Policy, error) {
71+
endpointPolicy, err := createEndpointPolicy(string(policyType), action, direction, priority)
7272
if err != nil {
7373
return policy.Policy{}, errors.Wrap(err, "failed to create endpoint policy")
7474
}
@@ -145,12 +145,12 @@ func (k *K8sSWIFTv2Middleware) IPConfigsRequestHandlerWrapper(defaultHandler, fa
145145
var defaultDenyEgressPolicy, defaultDenyIngressPolicy policy.Policy
146146

147147
if defaultDenyACLbool && ipInfo.NICType == cns.InfraNIC {
148-
defaultDenyEgressPolicy, err = getEndpointPolicy(string(policy.ACLPolicy), cns.ActionTypeBlock, cns.DirectionTypeOut, 10_000)
148+
defaultDenyEgressPolicy, err = getEndpointPolicy(policy.ACLPolicy, cns.ActionTypeBlock, cns.DirectionTypeOut, 10_000)
149149
if err != nil {
150150
logger.Errorf("failed to add default deny acl's for pod %v with err %v", podInfo.Name(), err)
151151
}
152152

153-
defaultDenyIngressPolicy, err = getEndpointPolicy(string(policy.ACLPolicy), cns.ActionTypeBlock, cns.DirectionTypeIn, 10_000)
153+
defaultDenyIngressPolicy, err = getEndpointPolicy(policy.ACLPolicy, cns.ActionTypeBlock, cns.DirectionTypeIn, 10_000)
154154
if err != nil {
155155
logger.Errorf("failed to add default deny acl's for pod %v with err %v", podInfo.Name(), err)
156156
}

0 commit comments

Comments
 (0)