Documentation ¶
Index ¶
- func CompareFS(a, b file.FS) error
- func CompareFileInfo(a, b file.InfoList) error
- func Contents(fs file.FS) map[string][]byte
- func NewFile(rd io.ReadCloser, info fs.FileInfo) fs.File
- func NewMockFS(opts ...FSOption) file.FS
- func WrapEmbedFS(fs embed.FS) file.FS
- type BufferCloser
- type FSOption
- type WriteFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareFS ¶
CompareFS returns nil if the two instances of fs.FS contain exactly the same files and file contents.
func CompareFileInfo ¶
Types ¶
type BufferCloser ¶
BufferCloser adds an io.Closer to bytes.Buffer.
func (*BufferCloser) Close ¶
func (bc *BufferCloser) Close() error
type FSOption ¶
type FSOption func(o *fsOptions)
FSOption represents an option to configure a new mock instance of fs.FS.
func FSErrorOnly ¶
FSErrorOnly requests a mock FS that always returns err.
func FSWithConstantContents ¶
FSWithConstantContents requests a mock FS that will return files of a random size (up to maxSize) with random contents.
func FSWithRandomContents ¶
FSWithRandomContents requests a mock FS that will return files of a random size (up to maxSize) with random contents.
Click to show internal directories.
Click to hide internal directories.