Add new function

This commit is contained in:
Melon 2021-12-24 01:17:44 +00:00
parent 88d8b292cd
commit 2c3f84d527
Signed by: melon
GPG Key ID: B0ADD5395BCDAAB6
2 changed files with 10 additions and 0 deletions

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -9,6 +9,10 @@ type NeuteredFileSystem struct {
fs http.FileSystem fs http.FileSystem
} }
func New(fs http.FileSystem) NeuteredFileSystem {
return NeuteredFileSystem{fs}
}
func (fs NeuteredFileSystem) Open(name string) (http.File, error) { func (fs NeuteredFileSystem) Open(name string) (http.File, error) {
f, err := fs.fs.Open(name) f, err := fs.fs.Open(name)
if err != nil { if err != nil {