Validate loads, provisions, and validates cfg, but does not start running it.
(cfg *Config)
| 744 | // Validate loads, provisions, and validates |
| 745 | // cfg, but does not start running it. |
| 746 | func 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. |