package handlers import ( "io/fs" "log" "git.dotya.ml/mirre-mt/pcmt/config" ) var ( conf *config.Config appver string ) func setConfig(c *config.Config) { if c != nil { log.Printf("setting handler config to %#v", conf) // c = conf log.Printf("set handler config to %#v", c) conf = c } else { log.Println("error passing conf to handlers") } } func getConfig() *config.Config { return conf } func setAppVer(v string) { log.Printf("handlers version: %s", v) appver = v } func InitHandlers(version string, appconf *config.Config, tmpls fs.FS) { setConfig(appconf) setAppVer(version) initTemplates(tmpls) }