1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-09 20:00:12 +00:00

lang: report section error comes from

doesn't directly report which file caused the error, but this is close
enough.
This commit is contained in:
Harvey Tindall 2024-08-04 18:09:25 +01:00
parent 28ca02272c
commit 016263894f
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2

View File

@ -2,6 +2,7 @@ package main
import (
"encoding/json"
"fmt"
"io/fs"
"log"
"os"
@ -779,22 +780,27 @@ type Lang struct {
func (st *Storage) loadLang(filesystems ...fs.FS) (err error) {
err = st.loadLangCommon(filesystems...)
if err != nil {
err = fmt.Errorf("common: %v", err)
return
}
err = st.loadLangAdmin(filesystems...)
if err != nil {
err = fmt.Errorf("admin: %v", err)
return
}
err = st.loadLangEmail(filesystems...)
if err != nil {
err = fmt.Errorf("email: %v", err)
return
}
err = st.loadLangUser(filesystems...)
if err != nil {
err = fmt.Errorf("user: %v", err)
return
}
err = st.loadLangPWR(filesystems...)
if err != nil {
err = fmt.Errorf("pwr: %v", err)
return
}
err = st.loadLangTelegram(filesystems...)