]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: add godoc for Dir.Open function
authorDmitry Mottl <dmitry.mottl@gmail.com>
Fri, 22 Feb 2019 16:50:54 +0000 (16:50 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Feb 2019 23:03:32 +0000 (23:03 +0000)
This commit adds godoc for Dir.Open function.

Change-Id: Ibc3b22f38660a082802e1f868c5cf9d880fc2801
GitHub-Last-Rev: 774cfd7d8cc61989179956e47d51451135b6c203
GitHub-Pull-Request: golang/go#30353
Reviewed-on: https://go-review.googlesource.com/c/163437
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/fs.go

index db44d6b0296eb0e76095f6ad712cfc353a53935e..41d46dced2a96d803ed66b797bf44778ba613f3b 100644 (file)
@@ -63,6 +63,8 @@ func mapDirOpenError(originalErr error, name string) error {
        return originalErr
 }
 
+// Open implements FileSystem using os.Open, opening files for reading rooted
+// and relative to the directory d.
 func (d Dir) Open(name string) (File, error) {
        if filepath.Separator != '/' && strings.ContainsRune(name, filepath.Separator) {
                return nil, errors.New("http: invalid character in file path")