testutils

package
v0.0.0-...-7635d6e Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestContentFS

func NewTestContentFS(t *testing.T) fs.FS

Types

type ConcurrentMapFS

type ConcurrentMapFS struct {
	// contains filtered or unexported fields
}

ConcurrentMapFS implements fs.FS and provides synchronized modification methods. This is intended as a replacement for fstest.MapFS that is safe to use concurrently.

func NewConcurrentMapFS

func NewConcurrentMapFS(mapFS fstest.MapFS) *ConcurrentMapFS

func (*ConcurrentMapFS) Delete

func (cmfs *ConcurrentMapFS) Delete(path string)

func (*ConcurrentMapFS) Open

func (cmfs *ConcurrentMapFS) Open(name string) (fs.File, error)

Open implements fs.FS.

func (*ConcurrentMapFS) Store

func (cmfs *ConcurrentMapFS) Store(path string, file *fstest.MapFile)

Jump to

Keyboard shortcuts

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