]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - cmd/safcm/config/groups.go
config: use more explicit variable name in ResolveHostGroups()
[safcm/safcm.git] / cmd / safcm / config / groups.go
index a1dd83a0164267a0f24a351a74966fd108300323..c998fb8a96f44ed2d3f6db7bac7c153214465581 100644 (file)
@@ -128,11 +128,10 @@ func LoadGroups(cfg *Config, hosts *Hosts) (map[string][]string, error) {
        return groups, nil
 }
 
-func ResolveHostGroups(host string,
-       groups map[string][]string,
+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 {
@@ -144,7 +143,7 @@ func ResolveHostGroups(host 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
                }