chore(policy): Change expandAutoGroup into a receiver func

This commit is contained in:
Gabe Cook 2024-10-12 19:16:15 -05:00
parent 2732e7a017
commit dd528a1753
No known key found for this signature in database
GPG key ID: 3197318BDE319B8D

View file

@ -671,7 +671,7 @@ func (pol *ACLPolicy) ExpandAlias(
} }
if isAutoGroup(alias) { if isAutoGroup(alias) {
return expandAutoGroup(pol, alias, nodes) return pol.expandAutoGroup(alias, nodes)
} }
// if alias is a user // if alias is a user
@ -990,7 +990,7 @@ func (pol *ACLPolicy) expandIPsFromIPPrefix(
return build.IPSet() return build.IPSet()
} }
func expandAutoGroup(pol *ACLPolicy, alias string, nodes types.Nodes) (*netipx.IPSet, error) { func (pol *ACLPolicy) expandAutoGroup(alias string, nodes types.Nodes) (*netipx.IPSet, error) {
switch { switch {
case strings.HasPrefix(alias, autogroupInternet): case strings.HasPrefix(alias, autogroupInternet):
return theInternet(), nil return theInternet(), nil