mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-13 06:52:24 +00:00
21 lines
505 B
Go
21 lines
505 B
Go
|
package generator
|
||
|
|
||
|
import "sort"
|
||
|
|
||
|
type languageInfo struct {
|
||
|
Type string `yaml:"type,omitempty"`
|
||
|
Extensions []string `yaml:"extensions,omitempty,flow"`
|
||
|
Interpreters []string `yaml:"interpreters,omitempty,flow"`
|
||
|
Filenames []string `yaml:"filenames,omitempty,flow"`
|
||
|
}
|
||
|
|
||
|
func getAlphabeticalOrderedKeys(languages map[string]*languageInfo) []string {
|
||
|
keyList := make([]string, 0)
|
||
|
for lang := range languages {
|
||
|
keyList = append(keyList, lang)
|
||
|
}
|
||
|
|
||
|
sort.Strings(keyList)
|
||
|
return keyList
|
||
|
}
|