Skip to content

Instantly share code, notes, and snippets.

@itzg
Created August 22, 2023 17:18
Show Gist options
  • Save itzg/e9f2ab17cdcbe5a824fb91dfe08c031b to your computer and use it in GitHub Desktop.
Save itzg/e9f2ab17cdcbe5a824fb91dfe08c031b to your computer and use it in GitHub Desktop.
C:
\\server\mount
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