fix: sort SupportedLanguages output for deterministic ordering
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
a09a4e9db9
commit
1910aec1fe
1 changed files with 4 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
)
|
||||
|
||||
// Supported SDK target languages.
|
||||
|
|
@ -86,11 +87,13 @@ func (g *SDKGenerator) Available() bool {
|
|||
return err == nil
|
||||
}
|
||||
|
||||
// SupportedLanguages returns the list of supported SDK target languages.
|
||||
// SupportedLanguages returns the list of supported SDK target languages
|
||||
// in sorted order for deterministic output.
|
||||
func SupportedLanguages() []string {
|
||||
langs := make([]string, 0, len(supportedLanguages))
|
||||
for k := range supportedLanguages {
|
||||
langs = append(langs, k)
|
||||
}
|
||||
sort.Strings(langs)
|
||||
return langs
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue