From 62d6f575ae1acd6b23be5cd2c774234834c8c9ea Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 29 Nov 2016 11:17:04 -0800 Subject: fmt code --- system/admin/filesystem.go | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'system/admin/filesystem.go') diff --git a/system/admin/filesystem.go b/system/admin/filesystem.go index 4e64a26..77c721e 100644 --- a/system/admin/filesystem.go +++ b/system/admin/filesystem.go @@ -1,13 +1,12 @@ package admin import ( - "net/http" + "net/http" "os" ) - func restrict(dir http.Dir) justFilesFilesystem { - return justFilesFilesystem{dir} + return justFilesFilesystem{dir} } // the code below removes the open directory listing when accessing a URL which @@ -16,21 +15,21 @@ func restrict(dir http.Dir) justFilesFilesystem { // credit: Brad Fitzpatrick (c) 2012 type justFilesFilesystem struct { - fs http.FileSystem + fs http.FileSystem } func (fs justFilesFilesystem) Open(name string) (http.File, error) { - f, err := fs.fs.Open(name) - if err != nil { - return nil, err - } - return neuteredReaddirFile{f}, nil + f, err := fs.fs.Open(name) + if err != nil { + return nil, err + } + return neuteredReaddirFile{f}, nil } type neuteredReaddirFile struct { - http.File + http.File } func (f neuteredReaddirFile) Readdir(count int) ([]os.FileInfo, error) { - return nil, nil + return nil, nil } -- cgit v1.2.3