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

Function Validate

caddy.go:746–752  ·  view source on GitHub ↗

Validate loads, provisions, and validates cfg, but does not start running it.

(cfg *Config)

Source from the content-addressed store, hash-verified

744// Validate loads, provisions, and validates
745// cfg, but does not start running it.
746func Validate(cfg *Config) error {
747 _, err := run(cfg, false)
748 if err == nil {
749 cfg.cancelFunc(fmt.Errorf("validation complete")) // call Cleanup on all modules
750 }
751 return err
752}
753
754// exitProcess exits the process as gracefully as possible,
755// but it always exits, even if there are errors doing so.

Callers

nothing calls this directly

Calls 1

runFunction · 0.85

Tested by

no test coverage detected