maintenance/aws-janitor/regions/regions.go
func GetAll(sess *session.Session) ([]string, error) {
	var regions []string
	svc := ec2.New(sess, &aws.Config{Region: aws.String(Default)})
	resp, err := svc.DescribeRegions(nil)
	if err != nil {
		return nil, err
	}
	for _, region := range resp.Regions {
		regions = append(regions, *region.RegionName)
	}
	return regions, nil
}
func GetAll(sess *session.Session) ([]string, error) {
	var regions []string
	svc := ec2.New(sess, &aws.Config{Region: aws.String(Default)})
	resp, err := svc.DescribeRegions(nil)
	if err != nil {
		return nil, err
	}
	for _, region := range resp.Regions {
		regions = append(regions, *region.RegionName)
	}
	return regions, nil
}
func GetAll ( sess * session . Session ) ( [ ] string , error ) { var regions [ ] string svc := ec2 . New ( sess , & aws . Config { Region : aws . String ( Default ) } ) resp , err := svc . DescribeRegions ( nil ) if err != nil { return nil , err } for _ , region := range resp . Regions { regions = append ( regions , * region . RegionName ) } return regions , nil }
// GetAll retrieves all regions from the AWS API
GetAll retrieves all regions from the AWS API