MCPcopy
hub / github.com/caddyserver/caddy / Provision

Method Provision

modules/caddytls/leaffileloader.go:45–54  ·  view source on GitHub ↗

Provision implements caddy.Provisioner.

(ctx caddy.Context)

Source from the content-addressed store, hash-verified

43
44// Provision implements caddy.Provisioner.
45func (fl *LeafFileLoader) Provision(ctx caddy.Context) error {
46 repl, ok := ctx.Value(caddy.ReplacerCtxKey).(*caddy.Replacer)
47 if !ok {
48 repl = caddy.NewReplacer()
49 }
50 for k, path := range fl.Files {
51 fl.Files[k] = repl.ReplaceKnown(path, "")
52 }
53 return nil
54}
55
56// UnmarshalCaddyfile implements caddyfile.Unmarshaler.
57func (fl *LeafFileLoader) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {

Callers 1

TestLeafFileLoaderFunction · 0.95

Calls 2

ReplaceKnownMethod · 0.80
ValueMethod · 0.45

Tested by 1

TestLeafFileLoaderFunction · 0.76