package handlers import ( "io/fs" "git.dotya.ml/mirre-mt/pcmt/config" "git.dotya.ml/mirre-mt/pcmt/slogging" ) var ( conf *config.Config appver string log *slogging.Logger tmplPath string ) func setConfig(c *config.Config) { if c != nil { log.Info("setting handler config") // c = conf conf = c log.Infof("set handler config to %#v", c) } else { log.Warn("error passing conf to handlers") } } func setAppVer(v string) { appver = v } func InitHandlers(version, templatesPath string, appconf *config.Config, tmpls fs.FS) { log = slogging.GetLogger() tmplPath = templatesPath setConfig(appconf) setAppVer(version) initTemplates(tmpls) }