]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: add comment to clarify whether Dir is '/' or '\'.
authorNigel Tao <nigeltao@golang.org>
Fri, 14 Nov 2014 00:43:01 +0000 (11:43 +1100)
committerNigel Tao <nigeltao@golang.org>
Fri, 14 Nov 2014 00:43:01 +0000 (11:43 +1100)
LGTM=bradfitz
R=bradfitz, alex.brainman
CC=golang-codereviews
https://golang.org/cl/168600044

src/net/http/fs.go

index 7bd777b712da9ff5961ea28dacd9f1c204ea28b7..e322f710a5d95361e9e6c0055641137b1b05b65d 100644 (file)
@@ -22,8 +22,12 @@ import (
        "time"
 )
 
-// A Dir implements http.FileSystem using the native file
-// system restricted to a specific directory tree.
+// A Dir implements FileSystem using the native file system restricted to a
+// specific directory tree.
+//
+// While the FileSystem.Open method takes '/'-separated paths, a Dir's string
+// value is a filename on the native file system, not a URL, so it is separated
+// by filepath.Separator, which isn't necessarily '/'.
 //
 // An empty Dir is treated as ".".
 type Dir string