// SortByName 名前でのソート
358311
func (api *AutoBackupAPI) SortByName(reverse bool) *AutoBackupAPI {
	api.sortByName(reverse)
	return api
}
397566
func (p *ProfilesClient) ListByName(ctx context.Context, name string) (*apitypes.Profile, error) {
	result := &apitypes.Profile{}
	err := p.client.RoundTrip(ctx, "GET", "/profiles/"+name, nil, nil, &result)
	return result, err
}
8050
func (sc *SkinCollection) GetByName(name string) (*Skin, error) {
	if skin, ok := sc.db[name]; ok {
		return &skin, nil
	}
	return nil, fmt.Errorf("no such skin: '%s'", name)
}
320733
func (api *ArchiveAPI) SortByName(reverse bool) *ArchiveAPI {
	api.sortByName(reverse)
	return api
}
949280
func (api *ProductInternetAPI) SortByName(reverse bool) *ProductInternetAPI {
	api.sortByName(reverse)
	return api
}
894309
func (listings Listings) lessByName(i, j int) bool {
	a := listings[i]
	b := listings[j]
	aNameLower := strings.ToLower(a.name)
	bNameLower := strings.ToLower(b.name)

	if aNameLower != bNameLower {
		return aNameLower < bNameLower
	}
	// If capitalization is the only thing different between the
	// words, put lower-case first.
	return a.name >= b.name
}
1255648
func (args *Arguments) GetParameterByName(name string) *Parameter {
	for _, param := range args.Parameters {
		if param.Name == name {
			return &param
		}
	}
	return nil
}
1133688
func (api *DNSAPI) SortByName(reverse bool) *DNSAPI {
	api.sortByName(reverse)
	return api
}
721299
func (api *DatabaseAPI) SortByName(reverse bool) *DatabaseAPI {
	api.sortByName(reverse)
	return api
}
1137056
func SortBy(rows [][]string, lesses ...LessFunc) *MultiSorter {
	return &MultiSorter{
		data: rows,
		less: lesses,
	}
}
84645
func SourceByName(name string) (Source, error) {
	for s, n := range sourceNames {
		if n == name {
			return s, nil
		}
	}
	return -1, fmt.Errorf("unknown source %q", name)
}
362818
func LocationsByName(locations []Location) (interface{}, func(_, _ int) bool) {
	return locations, func(i, j int) bool {
		return locations[i].Name < locations[j].Name
	}
}
1169015
func (t *PackageList) LookupByName(name string) *build.Package {
	t.ensureInit()
	return t.namepool[name]
}
1013023
func (m Map) ClusterByName(name string) (*container.Cluster, bool) {
	cl, found := m.nameMap[name]
	return cl, found
}
474094
func (q *Query) SortBy(fields ...string) *Query {
	for i := range fields {
		if fields[i] == Key {
			panic("Cannot sort by Key.")
		}
		found := false
		for k := range q.sort {
			if q.sort[k] == fields[i] {
				found = true
				break
			}
		}
		if !found {
			q.sort = append(q.sort, fields[i])
		}
	}
	return q
}
607683
func CloudByName(cloudName string) (*jujucloud.Cloud, error) {
	cloud, err := jujucloud.CloudByName(cloudName)
	if err != nil {
		if errors.IsNotFound(err) {
			// Check built in clouds like localhost (lxd).
			builtinClouds, err := BuiltInClouds()
			if err != nil {
				return nil, errors.Trace(err)
			}
			aCloud, found := builtinClouds[cloudName]
			if !found {
				return nil, errors.NotFoundf("cloud %s", cloudName)
			}
			return &aCloud, nil
		}
		return nil, errors.Trace(err)
	}
	return cloud, nil
}
852079
func (mc MongoClient) DeleteRegistrationByName(name string) error {
	return mc.deleteRegistration(bson.M{"name": name})
}