code: func appsToTargetGroups(apps *appList) map[string]*targetgroup.Group {
  	tgroups := map[string]*targetgroup.Group{}
  	for _, a := range apps.Apps {
  		group := createTargetGroup(&a)
  		tgroups[group.Source] = group
  	}
  	return tgroups
  }
docs: // appsToTargetGroups takes an array of Marathon apps and converts them into target groups.