mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
net/http: add godoc for Dir.Open function
This commit adds godoc for Dir.Open function.
Change-Id: Ibc3b22f38660a082802e1f868c5cf9d880fc2801
GitHub-Last-Rev: 774cfd7d8c
GitHub-Pull-Request: golang/go#30353
Reviewed-on: https://go-review.googlesource.com/c/163437
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
c3c90d0132
commit
b68624464d
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue