Open
Description
What version of Go are you using (go version
)?
$ go version 1..14.4
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env
)?
Operating system and architecture independent.
What did you do?
Read the docs.
What did you expect to see?
func VolumeRoot(path string) string
or something similar that reflects what VolumeName
actually returns.
-or-
Documentation to the effect that VolumeName
in fact returns a volume name.
A volume name on Windows is also known as a volume label.
What did you see instead?
The function certainly does not return a volume name, hence either the name or its behavior and documentation are wrong.
Having VolumeName("C:\A")
return "C:" is confusing and inconsistent. It could also be considered wrong, since "C:" is a relative path which would resolve to %CD%
or C:.
and Abs
is also documented to never return C:
for probably this reason. However this issue is about the function returning a path, not a name, as one would not be overly unjustified expect.