func GetGroupNameSliceForUser(username *string, svc *iam.Client) []string {
	params := &iam.ListGroupsForUserInput{
		UserName: username,
	}
	resp, err := svc.ListGroupsForUser(context.TODO(), params)

	if err != nil {
		panic(err)
	}
	groups := make([]string, len(resp.Groups))
	if len(resp.Groups) > 0 {
		for counter, group := range resp.Groups {
			groups[counter] = *group.GroupName
		}
	}
	return groups
}
// GetGroupNameSliceForUser retrieves a slice of all the groups the provided
// IAM username belongs to
GetGroupNameSliceForUser retrieves a slice of all the groups the provided
IAM username belongs to
// GetGroupNameSliceForUser retrieves a slice of all the groups the provided // IAM username belongs to
func GetGroupNameSliceForUser(username *string, svc *iam.Client) []string {
	params := &iam.ListGroupsForUserInput{
		UserName: username,
	}
	resp, err := svc.ListGroupsForUser(context.TODO(), params)
	if err != nil {
		panic(err)
	}
	groups := make([]string, len(resp.Groups))
	if len(resp.Groups) > 0 {
		for counter, group := range resp.Groups {
			groups[counter] = *group.GroupName
		}
	}
	return groups
}
func GetGroupNameSliceForUser ( username * string , svc * iam . Client ) [ ] string { params := & iam . ListGroupsForUserInput { UserName : username , } resp , err := svc . ListGroupsForUser ( context . TODO ( ) , params ) if err != nil { panic ( err ) } groups := make ( [ ] string , len ( resp . Groups ) ) if len ( resp . Groups ) > 0 { for counter , group := range resp . Groups { groups [ counter ] = * group . GroupName } } return groups }
GetGroupNameSliceForUser retrieves a slice of all the groups the provided
IAM username belongs to
GetGroupNameSliceForUser retrieves a slice of all the groups the provided IAM username belongs to