]> Cypherpunks repositories - gostls13.git/commitdiff
path/filepath: note that SplitList is different from strings.Split
authorRuss Cox <rsc@golang.org>
Wed, 29 Feb 2012 20:50:46 +0000 (15:50 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 29 Feb 2012 20:50:46 +0000 (15:50 -0500)
R=golang-dev, r, bradfitz, gustavo
CC=golang-dev
https://golang.org/cl/5712044

src/pkg/path/filepath/path.go

index f468d33264bf50c2b9c0dcbf7e0d9e36f4299445..cfe46981f131255bd5d8f9f347772d385e2a533e 100644 (file)
@@ -139,6 +139,7 @@ func FromSlash(path string) string {
 
 // SplitList splits a list of paths joined by the OS-specific ListSeparator,
 // usually found in PATH or GOPATH environment variables.
+// Unlike strings.Split, SplitList returns an empty slice when passed an empty string.
 func SplitList(path string) []string {
        if path == "" {
                return []string{}