Documentation ¶
Overview ¶
Package fstest is a drop-in replacement for the standard testing/fstest package which adds a few extensions that have proven useful when testing implementations of the fs.FS interface.
For a full documentation of the standard testing/fs package see: https://pkg.go.dev/testing/fstest
Index ¶
- func EqualFS(a, b fs.FS) error
- func EqualFSBuffer(a, b fs.FS, buf []byte) error
- func TestFS(fsys fs.FS, expected ...string) error
- type MapFS
- func (fsys MapFS) Glob(pattern string) ([]string, error)
- func (fsys MapFS) Open(name string) (fs.File, error)
- func (fsys MapFS) ReadDir(name string) ([]fs.DirEntry, error)
- func (fsys MapFS) ReadFile(name string) ([]byte, error)
- func (fsys MapFS) ReadLink(name string) (string, error)
- func (fsys MapFS) Stat(name string) (fs.FileInfo, error)
- func (fsys MapFS) Sub(name string) (fs.FS, error)
- type MapFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualFS ¶
EqualFS compares two file systems, returning nil if they are equal, or an error describing their difference when they are not.
func EqualFSBuffer ¶
EqualFSBuffer is like EqualFS but the function receives the buffer used to read files as arguments.
Types ¶
Click to show internal directories.
Click to hide internal directories.