Skip to content

Commit e89f70f

Browse files
committed
switch from having consts to making them inline
1 parent 5187545 commit e89f70f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cns/middlewares/k8sSwiftV2_windows.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ func addDefaultDenyACL(podIPInfo *cns.PodIpInfo) error {
9393

9494
// create the default deny acl's that need to be added to the list defaultDenyACL field in podIpInfo
9595
func getDefaultDenyACLPolicy(direction hcn.DirectionType) ([]byte, error) {
96-
const DefaultDenyPriority = 10000
97-
const policyType = "ACL"
9896
type DefaultDenyACL struct {
9997
Type string `json:"Type"`
10098
Action hcn.ActionType `json:"Action"`
@@ -103,10 +101,10 @@ func getDefaultDenyACLPolicy(direction hcn.DirectionType) ([]byte, error) {
103101
}
104102

105103
denyACL := DefaultDenyACL{
106-
Type: policyType,
104+
Type: "ACL", // policy type is ACL
107105
Action: hcn.ActionTypeBlock,
108106
Direction: direction,
109-
Priority: DefaultDenyPriority,
107+
Priority: 10_000, // default deny priority will be 10_000
110108
}
111109

112110
denyACLJSON, err := json.Marshal(denyACL)

0 commit comments

Comments
 (0)