update func comment (#981)

This commit is contained in:
田欧
2017-07-06 09:28:16 +08:00
committed by Bo-Yi Wu
parent 22ee916dfe
commit b985857899
6 changed files with 15 additions and 16 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ func Dir(root string, listDirectory bool) http.FileSystem {
return &onlyfilesFS{fs}
}
// Conforms to http.Filesystem
// Open conforms to http.Filesystem
func (fs onlyfilesFS) Open(name string) (http.File, error) {
f, err := fs.fs.Open(name)
if err != nil {
@@ -38,7 +38,7 @@ func (fs onlyfilesFS) Open(name string) (http.File, error) {
return neuteredReaddirFile{f}, nil
}
// Overrides the http.File default implementation
// Readdir overrides the http.File default implementation
func (f neuteredReaddirFile) Readdir(count int) ([]os.FileInfo, error) {
// this disables directory listing
return nil, nil