mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Fix typos & add more comments
This commit is contained in:
parent
2e9ce3cf52
commit
3617955bc5
16 changed files with 82 additions and 68 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"github.com/ByteDream/crunchyroll-go"
|
||||
)
|
||||
|
||||
// AllLocales is an array of all available locales.
|
||||
var AllLocales = []crunchyroll.LOCALE{
|
||||
crunchyroll.JP,
|
||||
crunchyroll.US,
|
||||
|
|
@ -18,7 +19,7 @@ var AllLocales = []crunchyroll.LOCALE{
|
|||
crunchyroll.AR,
|
||||
}
|
||||
|
||||
// ValidateLocale validates if the given locale actually exist
|
||||
// ValidateLocale validates if the given locale actually exist.
|
||||
func ValidateLocale(locale crunchyroll.LOCALE) bool {
|
||||
for _, l := range AllLocales {
|
||||
if l == locale {
|
||||
|
|
@ -28,7 +29,7 @@ func ValidateLocale(locale crunchyroll.LOCALE) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// LocaleLanguage returns the country by its locale
|
||||
// LocaleLanguage returns the country by its locale.
|
||||
func LocaleLanguage(locale crunchyroll.LOCALE) string {
|
||||
switch locale {
|
||||
case crunchyroll.JP:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue