(stdout []byte)
| 76 | } |
| 77 | |
| 78 | func parseNullSeparatedPaths(stdout []byte) []string { |
| 79 | parts := strings.Split(string(stdout), "\x00") |
| 80 | paths := make([]string, 0, len(parts)) |
| 81 | for _, part := range parts { |
| 82 | path := strings.TrimSpace(part) |
| 83 | if path == "" { |
| 84 | continue |
| 85 | } |
| 86 | paths = append(paths, path) |
| 87 | } |
| 88 | return paths |
| 89 | } |
| 90 | |
| 91 | // FileExists checks whether a file exists on disk. |
| 92 | func FileExists(path string) (bool, error) { |
no outgoing calls
no test coverage detected