MCPcopy Index your code
hub / github.com/docker/cli / splitWindowsDrive

Function splitWindowsDrive

cli/command/telemetry_docker.go:217–222  ·  view source on GitHub ↗

splitWindowsDrive checks if the string references a windows drive (such as c:) and returns the drive letter if it is.

(s string)

Source from the content-addressed store, hash-verified

215// splitWindowsDrive checks if the string references a windows
216// drive (such as c:) and returns the drive letter if it is.
217func 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
224func stat(p string, f fs.FS) (fs.FileInfo, error) {
225 if f, ok := f.(fs.StatFS); ok {

Callers 1

parseUNCPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…