photoprism/internal/maps/country.go
Michael Mayer dcc610d7a9 Use AlbumType to distinguish between manual collections and moments #154
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-29 12:21:17 +02:00

18 lines
300 B
Go

package maps
import "strings"
// CountryName tries to find a matching country name for a code.
func CountryName(code string) string {
if code == "" {
code = "zz"
} else {
code = strings.ToLower(code)
}
if name, ok := CountryNames[code]; ok {
return name
}
return CountryNames["zz"]
}