fakefilesystem

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	Dirs     []string
	Files    map[string][]byte
	Symlinks map[string]string
}

FS allows to setup isolated fake files structure used for the tests.

func (*FS) Use

func (f *FS) Use() (string, func(), error)

Use function creates entire files structure and returns a function to tear it down. Example usage:

``` rootDir, fakeFsClean, err := defer fs.Use() if err != nil { ... } defer fakeFsClean() ````

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL