MCPcopy Create free account
hub / github.com/activecm/rita / RunValidateConfigCommand

Function RunValidateConfigCommand

cmd/validate.go:53–68  ·  view source on GitHub ↗
(afs afero.Fs, configPath string)

Source from the content-addressed store, hash-verified

51}
52
53func RunValidateConfigCommand(afs afero.Fs, configPath string) (*config.Config, error) {
54 // validate config file path
55 if err := ValidateConfigPath(afs, configPath); err != nil {
56 return nil, err
57 }
58
59 // load config path
60 cfg, err := config.ReadFileConfig(afs, configPath)
61 if err != nil {
62 return nil, err
63 }
64
65 fmt.Printf("\n\t[✨] Configuration file is valid \n\n")
66
67 return cfg, nil
68}
69
70func ValidateConfigPath(afs afero.Fs, configPath string) error {
71 if configPath == "" {

Callers 1

validate.goFile · 0.85

Calls 2

ReadFileConfigFunction · 0.92
ValidateConfigPathFunction · 0.85

Tested by

no test coverage detected