From: Simon Ruderich Date: Sun, 9 May 2021 10:31:26 +0000 (+0200) Subject: config: use more explicit variable name in ResolveHostGroups() X-Git-Url: https://ruderich.org/simon/gitweb/?p=safcm%2Fsafcm.git;a=commitdiff_plain;h=f4bae10a4029edfb5db6cb9d305b5d67135409f0 config: use more explicit variable name in ResolveHostGroups() --- 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 }