Open implements the http.FileSystem interface If a file is present, no error will be returned. This implementation always returns a nil File.
(name string)
| 31 | // If a file is present, no error will be returned. |
| 32 | // This implementation always returns a nil File. |
| 33 | func (f *fakeFileSystem) Open(name string) (http.File, error) { |
| 34 | log.Println("requesting" + name) |
| 35 | |
| 36 | if _, ok := f.files[name]; !ok { |
| 37 | return nil, os.ErrNotExist |
| 38 | } |
| 39 | return os.Open("misc_test.go") |
| 40 | // return nil, nil |
| 41 | } |
| 42 | |
| 43 | func TestRoutePrefixForStatic(t *testing.T) { |
| 44 | fs := &fakeFileSystem{map[string]struct{}{ |