Add new function
This commit is contained in:
parent
88d8b292cd
commit
2c3f84d527
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal 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>
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user