testutils

package
v0.0.0-...-d2fa2ec Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsFilePath

func AbsFilePath(t *testing.T, path string) string

AbsFilePath calls filepath.Abs on path.

func FsysWithJsonCavoriteConfig

func FsysWithJsonCavoriteConfig(t *testing.T, b []byte) afero.Fs

func MemMapFsWith

func MemMapFsWith(files map[string]MapFile) (*afero.Fs, error)

memMapFsWith creates a afero.MemMapFs from a map[string]mapFile

func WalkFs

func WalkFs(fs afero.Fs, w io.Writer) error

Types

type MapFile

type MapFile struct {
	Content []byte
	ModTime *time.Time
}

type MemMapFsWithBrokenCreate

type MemMapFsWithBrokenCreate struct {
	afero.Fs
}

func (*MemMapFsWithBrokenCreate) Create

func (m *MemMapFsWithBrokenCreate) Create(name string) (afero.File, error)

Jump to

Keyboard shortcuts

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