func (te *TypeEntry) Order() {
	if te.OrderedKeys != nil {
		return
	}

	te.OrderedKeys = make([]Identifier, 0, len(te.Resources))
	for ident, re := range te.Resources {
		te.OrderedKeys = append(te.OrderedKeys, ident)

		// Order LCIDs in every resource
		re.order()
	}

	// Names in case sensitive ascending order, then IDs in ascending order
	sort.Slice(te.OrderedKeys, func(i, j int) bool {
		return te.OrderedKeys[i].lessThan(te.OrderedKeys[j])
	})

	// Count Names by searching the first ID
	te.NamesCount = sort.Search(len(te.OrderedKeys), func(i int) bool {
		_, ok := te.OrderedKeys[i].(ID)
		return ok
	})
}
// Order orders ids and names following the specification, and saves them in orderedKeys.
// It calls resourceEntry.Order() too, for each resource entry it owns.
Order orders ids and names following the specification, and saves them in orderedKeys.
It calls resourceEntry.Order() too, for each resource entry it owns.
// Order orders ids and names following the specification and saves them in orderedKeys . // It calls resourceEntry . Order () too for each resource entry it owns .
func (te *TypeEntry) Order() {
	if te.OrderedKeys != nil {
		return
	}
	te.OrderedKeys = make([]Identifier, 0, len(te.Resources))
	for ident, re := range te.Resources {
		te.OrderedKeys = append(te.OrderedKeys, ident)
		re.order()
	}
	sort.Slice(te.OrderedKeys, func(i, j int) bool {
		return te.OrderedKeys[i].lessThan(te.OrderedKeys[j])
	})
	te.NamesCount = sort.Search(len(te.OrderedKeys), func(i int) bool {
		_, ok := te.OrderedKeys[i].(ID)
		return ok
	})
}
func ( te * TypeEntry ) Order ( ) { if te . OrderedKeys != nil { return } te . OrderedKeys = make ( [ ] Identifier , 0 , len ( te . Resources ) ) for ident , re := range te . Resources { te . OrderedKeys = append ( te . OrderedKeys , ident ) re . order ( ) } sort . Slice ( te . OrderedKeys , func ( i , j int ) bool { return te . OrderedKeys [ i ] . lessThan ( te . OrderedKeys [ j ] ) } ) te . NamesCount = sort . Search ( len ( te . OrderedKeys ) , func ( i int ) bool { _ , ok := te . OrderedKeys [ i ] . ( ID ) return ok } ) }
Order orders ids and names following the specification, and saves them in orderedKeys.
Order orders ids and names following the specification and saves them in orderedKeys .
// Order LCIDs in every resource // Names in case sensitive ascending order, then IDs in ascending order // Count Names by searching the first ID