From 2c3f84d527297b77d4304d4a262c365821957546 Mon Sep 17 00:00:00 2001 From: MrMelon Date: Fri, 24 Dec 2021 01:17:44 +0000 Subject: [PATCH] Add new function --- .idea/vcs.xml | 6 ++++++ neutered-filesystem.go | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/neutered-filesystem.go b/neutered-filesystem.go index 95fc545..2dd4001 100644 --- a/neutered-filesystem.go +++ b/neutered-filesystem.go @@ -9,6 +9,10 @@ type NeuteredFileSystem struct { fs http.FileSystem } +func New(fs http.FileSystem) NeuteredFileSystem { + return NeuteredFileSystem{fs} +} + func (fs NeuteredFileSystem) Open(name string) (http.File, error) { f, err := fs.fs.Open(name) if err != nil {