func matchingTargets(rd *profilesreader.Reader, profile *profiles.Profile) profiles.Targets { var targets profiles.Targets if IsFlagSet(cmdList.ParsedFlags, "target") { if t := rd.LookupProfileTarget(profile.Name(), listFlags.Target); t != nil { targets = profiles.Targets{t} } } else { targets = profile.Targets() } targets.Sort() return targets }