MCPcopy Index your code
hub / github.com/idank/explainshell / Provision

Method Provision

prod/botshed/module.go:68–78  ·  view source on GitHub ↗
(ctx caddy.Context)

Source from the content-addressed store, hash-verified

66}
67
68func (b *Botshed) Provision(ctx caddy.Context) error {
69 b.logger = ctx.Logger()
70 // Caddyfile values like {env.DB_PATH} arrive as raw tokens; expand
71 // them once at provision time so the loaders see real paths/addrs.
72 repl := caddy.NewReplacer()
73 b.DBPath = repl.ReplaceAll(b.DBPath, "")
74 b.Upstream = repl.ReplaceAll(b.Upstream, "")
75 go b.loadBasenames()
76 go b.loadCanned()
77 return nil
78}
79
80func (b *Botshed) loadBasenames() {
81 if b.DBPath == "" {

Callers

nothing calls this directly

Calls 2

loadBasenamesMethod · 0.95
loadCannedMethod · 0.95

Tested by

no test coverage detected