From: Emil Hessman Date: Thu, 18 Dec 2014 07:11:42 +0000 (+0100) Subject: path/filepath: remove named result parameter for VolumeName X-Git-Tag: go1.5beta1~2603 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ddd666b122b327c96a845d0d0045f4c2cc12bd19;p=gostls13.git 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/1781 Reviewed-by: Yasuhiro MATSUMOTO Reviewed-by: Ian Lance Taylor --- diff --git a/src/path/filepath/path.go b/src/path/filepath/path.go index d37fc9dfc8..3bde14b91e 100644 --- a/src/path/filepath/path.go +++ b/src/path/filepath/path.go @@ -456,9 +456,9 @@ func Dir(path string) string { } // 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". // On other platforms it returns "". -func VolumeName(path string) (v string) { +func VolumeName(path string) string { return path[:volumeNameLen(path)] }