diff options
author | Nigel Tao <nigeltao@golang.org> | 2014-11-14 11:43:01 +1100 |
---|---|---|
committer | Nigel Tao <nigeltao@golang.org> | 2014-11-14 11:43:01 +1100 |
commit | ef0c0a2b95359c9c48922d81c2af8968afb05a48 (patch) | |
tree | f0e7679d54f1d41360708654d177fa4fdc12cc39 | |
parent | dfa6e491915706addc5cee4178a1921f8dd2dacd (diff) | |
download | go-ef0c0a2b95359c9c48922d81c2af8968afb05a48.tar.gz |
net/http: add comment to clarify whether Dir is '/' or '\'.
LGTM=bradfitz
R=bradfitz, alex.brainman
CC=golang-codereviews
https://codereview.appspot.com/168600044
-rw-r--r-- | src/net/http/fs.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/http/fs.go b/src/net/http/fs.go index 7bd777b71..e322f710a 100644 --- a/src/net/http/fs.go +++ b/src/net/http/fs.go @@ -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 |