leo
122ea638c9
All checks were successful
continuous-integration/drone/push Build is passing
* create pkg 'modules/template' * move template rendering code from 'handlers' to 'modules/template' * update call sites * walk the 'templates' dir to discover nested hierarchies * solidify LiveMode handling (vs embedded assets) * break out funcMap to it's own file * general clean-up
27 lines
495 B
Go
27 lines
495 B
Go
package handlers
|
|
|
|
import (
|
|
"git.dotya.ml/mirre-mt/pcmt/app/settings"
|
|
"git.dotya.ml/mirre-mt/pcmt/slogging"
|
|
"golang.org/x/exp/slog"
|
|
)
|
|
|
|
var (
|
|
setting *settings.Settings
|
|
appver string
|
|
slogger *slogging.Logger
|
|
log slogging.Logger
|
|
)
|
|
|
|
func InitHandlers(s *settings.Settings) {
|
|
slogger = slogging.GetLogger()
|
|
log = *slogger // have a local copy.
|
|
log.Logger = log.Logger.With(
|
|
slog.Group("pcmt extra", slog.String("module", "handlers")),
|
|
)
|
|
|
|
setting = s
|
|
|
|
appver = setting.Version()
|
|
}
|