// SortByName 名称でのソート
480538
func (api *LoadBalancerAPI) SortByName(reverse bool) *LoadBalancerAPI {
	api.sortByName(reverse)
	return api
}
835381
func (tf tFiles) sortByKey(icmp *iComparer) {
	sort.Sort(&tFilesSortByKey{tFiles: tf, icmp: icmp})
}
376764
func filterClustersByName(clusterNames []string, clusters []*api.Cluster) ([]*api.Cluster, error) {
	if len(clusterNames) != 0 {
		// Build a map as we want to return them in the same order as args
		m := make(map[string]*api.Cluster)
		for _, c := range clusters {
			m[c.ObjectMeta.Name] = c
		}
		var filtered []*api.Cluster
		for _, clusterName := range clusterNames {
			c := m[clusterName]
			if c == nil {
				return nil, fmt.Errorf("cluster not found %q", clusterName)
			}

			filtered = append(filtered, c)
		}
		return filtered, nil
	}

	return clusters, nil
}
54582
func (r Routes) FindRouteByName(name string) (Route, bool) {
	for _, route := range r {
		if route.Name == name {
			return route, true
		}
	}
	return Route{}, false
}
864621
func (api *PublicPriceAPI) SortByName(reverse bool) *PublicPriceAPI {
	api.sortBy("DisplayName", reverse)
	return api
}
981405
func (api *VPCRouterAPI) SortByName(reverse bool) *VPCRouterAPI {
	api.sortByName(reverse)
	return api
}
246312
func (api *NoteAPI) SortBy(key string, reverse bool) *NoteAPI {
	api.sortBy(key, reverse)
	return api
}
1095059
func (um *UserMap) GetByName(name string) (User, error) {
	um.Lock()
	defer um.Unlock()

	for _, user := range um.Map {
		if user.Name == name {
			if user.Options == nil {
				user.Options = make(map[string]interface{})
			}
			return user, nil
		}
	}
	return User{Options: make(map[string]interface{})}, fmt.Errorf("could not find user with name %s", name)
}
975169
func (q *QueryString) SortOrder(name string) (os []*SortOrder, err error) {
	defer func() {
		if rec := recover(); rec != nil {
			err = rec.(error)
		}
	}()

	raw, ok := q.fields[name]
	if !ok {
		return nil, fmt.Errorf("field not found: %q", name)
	}

	os, raw = parseSortOrders(raw)
	if len(raw) != 0 {
		os = nil
		err = UnexpectedEndOfSortOrders
	}

	return
}
1136135
func (s *ScrollService) SortBy(sorter ...Sorter) *ScrollService {
	s.ss = s.ss.SortBy(sorter...)
	return s
}
125832
func (api *GSLBAPI) SortByName(reverse bool) *GSLBAPI {
	api.sortByName(reverse)
	return api
}
675890
func (api *CDROMAPI) SortByName(reverse bool) *CDROMAPI {
	api.sortByName(reverse)
	return api
}
194961
func (api *PacketFilterAPI) SortByName(reverse bool) *PacketFilterAPI {
	api.sortByName(reverse)
	return api
}
181820
func (api *SSHKeyAPI) SortByName(reverse bool) *SSHKeyAPI {
	api.sortByName(reverse)
	return api
}
299470
func (formats Formats) GetByName(name string) (f Format, found bool) {
	for _, ff := range formats {
		if strings.EqualFold(name, ff.Name) {
			f = ff
			found = true
			return
		}
	}
	return
}
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)
}
82762
func (d *DMI) SearchByName(name string) ([]Record, error) {
	return d.GenericSearchBy("DMIName", name)
}