Update common.go

Thanks @lafriks for catching this!

Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
Luke Francl 2021-10-12 16:20:14 -07:00 committed by GitHub
parent 02878b9c9f
commit 57c5940dbe
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -570,7 +570,7 @@ func GetLanguageInfo(language string) (data.LanguageInfo, error) {
return GetLanguageInfoByID(id) return GetLanguageInfoByID(id)
} }
// GetLanguageInfo returns the LanguageInfo for a given language name, or an error if not found. // GetLanguageInfoByID returns the LanguageInfo for a given language ID, or an error if not found.
func GetLanguageInfoByID(id int) (data.LanguageInfo, error) { func GetLanguageInfoByID(id int) (data.LanguageInfo, error) {
if info, ok := data.LanguageInfoByID[id]; ok { if info, ok := data.LanguageInfoByID[id]; ok {
return info, nil return info, nil