X-Git-Url: https://ruderich.org/simon/gitweb/?p=safcm%2Fsafcm.git;a=blobdiff_plain;f=cmd%2Fsafcm%2Fconfig%2Fgroups.go;h=c998fb8a96f44ed2d3f6db7bac7c153214465581;hp=571f19b7fcb10b5adcd4c5e406d6f22e5b585730;hb=f4bae10a4029edfb5db6cb9d305b5d67135409f0;hpb=e452996e2008d438aa68dedbd206525f507b73d3 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 }