Created
August 22, 2023 17:18
-
-
Save itzg/e9f2ab17cdcbe5a824fb91dfe08c031b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C: | |
\\server\mount |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "path/filepath" | |
func main() { | |
println(filepath.VolumeName("C:\\Users")) | |
println(filepath.VolumeName("\\\\server\\mount\\a\\b")) | |
println(filepath.VolumeName("/usr/lib")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment