Commit ddd666b1 authored by Emil Hessman's avatar Emil Hessman Committed by Ian Lance Taylor

path/filepath: remove named result parameter for VolumeName

Fix style by removing unnecessary named result parameter.

Fix doc comment while here.

Change-Id: If8394e696ab37e00a95484d5137955aa06c59520
Reviewed-on: https://go-review.googlesource.com/1781Reviewed-by: default avatarYasuhiro MATSUMOTO <mattn.jp@gmail.com>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent b21e936f
...@@ -456,9 +456,9 @@ func Dir(path string) string { ...@@ -456,9 +456,9 @@ func Dir(path string) string {
} }
// VolumeName returns leading volume name. // VolumeName returns leading volume name.
// Given "C:\foo\bar" it returns "C:" under windows. // Given "C:\foo\bar" it returns "C:" on Windows.
// Given "\\host\share\foo" it returns "\\host\share". // Given "\\host\share\foo" it returns "\\host\share".
// On other platforms it returns "". // On other platforms it returns "".
func VolumeName(path string) (v string) { func VolumeName(path string) string {
return path[:volumeNameLen(path)] return path[:volumeNameLen(path)]
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment