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

Function ValidateConfigPath

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

Source from the content-addressed store, hash-verified

68}
69
70func ValidateConfigPath(afs afero.Fs, configPath string) error {
71 if configPath == "" {
72 return ErrMissingConfigPath
73 }
74
75 // get relative file path
76 _, err := util.ParseRelativePath(configPath)
77 if err != nil {
78 return err
79 }
80
81 // validate file path
82 if err := util.ValidateFile(afs, configPath); err != nil {
83 return err
84 }
85
86 return nil
87}

Callers 2

ConfigFlagFunction · 0.85
RunValidateConfigCommandFunction · 0.85

Calls 2

ParseRelativePathFunction · 0.92
ValidateFileFunction · 0.92

Tested by

no test coverage detected