(name string)
| 505 | type fakeFS map[string]*fakeFileInfo |
| 506 | |
| 507 | func (fs fakeFS) Open(name string) (http.File, error) { |
| 508 | name = path.Clean(name) |
| 509 | f, ok := fs[name] |
| 510 | if !ok { |
| 511 | return nil, os.ErrNotExist |
| 512 | } |
| 513 | return &fakeFile{ReadSeeker: strings.NewReader(f.contents), fi: f, path: name}, nil |
| 514 | } |
| 515 | |
| 516 | func TestNotFoundOverride(t *testing.T) { |
| 517 | defer afterTest(t) |
no outgoing calls
no test coverage detected