mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
all related to extension strategy renamed to reference it
This commit is contained in:
20
internal/code-generator/generator/langinfo.go
Normal file
20
internal/code-generator/generator/langinfo.go
Normal file
@ -0,0 +1,20 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user