splitWindowsDrive checks if the string references a windows drive (such as c:) and returns the drive letter if it is.
(s string)
| 215 | // splitWindowsDrive checks if the string references a windows |
| 216 | // drive (such as c:) and returns the drive letter if it is. |
| 217 | func splitWindowsDrive(s string) (string, bool) { |
| 218 | if b := []rune(s); len(b) == 2 && unicode.IsLetter(b[0]) && b[1] == ':' { |
| 219 | return string(b[0]), true |
| 220 | } |
| 221 | return "", false |
| 222 | } |
| 223 | |
| 224 | func stat(p string, f fs.FS) (fs.FileInfo, error) { |
| 225 | if f, ok := f.(fs.StatFS); ok { |
no outgoing calls
no test coverage detected
searching dependent graphs…