1
0
forked from Plemya-x/ALR

chore: fix formatting

This commit is contained in:
2025-01-30 10:10:42 +03:00
parent 4463a32ae7
commit d201aae6e0
19 changed files with 253 additions and 147 deletions

View File

@ -42,18 +42,19 @@ var (
// Subsequent calls will just return the same value.
func Language(ctx context.Context) language.Tag {
langMtx.Lock()
defer langMtx.Unlock()
if !langSet {
syslang := SystemLang()
tag, err := language.Parse(syslang)
if err != nil {
slog.Error(gotext.Get("Error parsing system language"), "err", err)
langMtx.Unlock()
os.Exit(1)
}
base, _ := tag.Base()
lang = language.Make(base.String())
langSet = true
}
langMtx.Unlock()
return lang
}

View File

@ -38,7 +38,7 @@ type Paths struct {
// using information from the system.
// Subsequent calls will return the same value.
//
// Depreacted: use struct API
// Deprecated: use struct API
func GetPaths(ctx context.Context) *Paths {
alrConfig := GetInstance(ctx)
return alrConfig.GetPaths(ctx)