fix: sort SupportedLanguages output for deterministic ordering

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-02-21 01:27:03 +00:00
parent a09a4e9db9
commit 1910aec1fe

View file

@ -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
}