pre-dev: add lang helper
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// Package langhelper provides helper functions for language
|
||||
package langhelper
|
||||
|
||||
import (
|
||||
a "github.com/karincake/apem"
|
||||
l "github.com/karincake/lepet"
|
||||
)
|
||||
|
||||
type Cfg struct {
|
||||
LangCfg *l.LangCfg `yaml:"langCfg"`
|
||||
}
|
||||
|
||||
func Populate() {
|
||||
cfg := &Cfg{
|
||||
LangCfg: &l.LangCfg{},
|
||||
}
|
||||
a.ParseCfg(&cfg)
|
||||
l.Init(cfg.LangCfg)
|
||||
}
|
||||
Reference in New Issue
Block a user