testhelpers

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FSWithFiles

func FSWithFiles(t *testing.T, files map[string]string) hackpadfs.FS

FSWithFiles returns an FS with the given files contents generated inside it. The contents are trimmed and a newline appended for convenient comparisons.

func OSFSWithTemp

func OSFSWithTemp(t *testing.T, relPathToModuleDir string) (_ hackpadfs.FS, workingDirectory, tempDirectory string)

OSFSWithTemp returns an os.FS instance with 1) the current module's directory and 2) a temporary directory mounted inside. Returns the FS paths to both mounts.

Types

This section is empty.

Jump to

Keyboard shortcuts

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