(afs afero.Fs, configPath string)
| 68 | } |
| 69 | |
| 70 | func 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 | } |
no test coverage detected