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

Function Run

caddy.go:104–110  ·  view source on GitHub ↗

Run runs the given config, replacing any existing config.

(cfg *Config)

Source from the content-addressed store, hash-verified

102
103// Run runs the given config, replacing any existing config.
104func Run(cfg *Config) error {
105 cfgJSON, err := json.Marshal(cfg)
106 if err != nil {
107 return err
108 }
109 return Load(cfgJSON, true)
110}
111
112// Load loads the given config JSON and runs it only
113// if it is different from the current config or

Callers

nothing calls this directly

Calls 1

LoadFunction · 0.85

Tested by

no test coverage detected