From f4bae10a4029edfb5db6cb9d305b5d67135409f0 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 9 May 2021 12:31:26 +0200 Subject: [PATCH] config: use more explicit variable name in ResolveHostGroups() --- cmd/safcm/config/groups.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/safcm/config/groups.go b/cmd/safcm/config/groups.go index 571f19b..c998fb8 100644 --- a/cmd/safcm/config/groups.go +++ b/cmd/safcm/config/groups.go @@ -131,7 +131,7 @@ func LoadGroups(cfg *Config, hosts *Hosts) (map[string][]string, error) { func ResolveHostGroups(host string, groups map[string][]string, detectedGroups []string) ([]string, error) { - const maxDepth = 100 + const maxRecursionDepth = 100 detectedGroupsMap := make(map[string]bool) for _, x := range detectedGroups { @@ -143,7 +143,7 @@ func ResolveHostGroups(host string, groups map[string][]string, // groups). var lookup func(string, int) bool lookup = func(group string, depth int) bool { - if depth > maxDepth { + if depth > maxRecursionDepth { cycle = &group return false } -- 2.45.2