func printTags(ctx context.Context, svc elasticsearchservice.ElasticsearchService, resourceIds []*string) { if ctx.Verbose { for _, arn := range resourceIds { ctx.PrintVerbose(fmt.Sprintf(" Processing domain %s", *arn)) resp, _ := svc.ListTags(&elasticsearchservice.ListTagsInput{ ARN: arn, }) // Well, this will throw an error if there are no tags instead of just returning an empty list...ugh // kingpin.FatalIfError(err, "Could not retrieve tags for elastic search domain %s", arn) for _, tag := range resp.TagList { ctx.PrintVerbose(fmt.Sprintf(" %s=%s", *tag.Key, *tag.Value)) } } } }