(path string)
| 228 | } |
| 229 | |
| 230 | func checkIfFileExists(path string) (os.FileInfo, error) { |
| 231 | fileInfo, err := os.Stat(path) |
| 232 | if err != nil { |
| 233 | if os.IsNotExist(err) { |
| 234 | return nil, &flags.Error{ |
| 235 | Type: flags.ErrRequired, |
| 236 | Message: fmt.Sprintf("The specified path '%s' does not exist.", path), |
| 237 | } |
| 238 | } |
| 239 | return nil, err |
| 240 | } |
| 241 | return fileInfo, nil |
| 242 | } |
no outgoing calls
no test coverage detected