MCPcopy Create free account
hub / github.com/appleboy/CodeGPT / GetLanguage

Function GetLanguage

prompt/language.go:16–21  ·  view source on GitHub ↗

GetLanguage returns the language name for the given language code, or the default language if the code is not recognized.

(langCode string)

Source from the content-addressed store, hash-verified

14// GetLanguage returns the language name for the given language code,
15// or the default language if the code is not recognized.
16func GetLanguage(langCode string) string {
17 if language, ok := languageMaps[langCode]; ok {
18 return language
19 }
20 return DefaultLanguage
21}

Callers 4

checkFunction · 0.92
review.goFile · 0.92
commit.goFile · 0.92
TestGetLanguageFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestGetLanguageFunction · 0.68