Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithCancel ¶
func WithCancel(d DeferFunc, f func()) (DeferFunc, CancelFunc)
WithCancel returns a deferrable function that can be cancelled.
Types ¶
type File ¶ added in v0.3.0
type File struct { // Path is the path to the file. Path string // Contents are the file contents. Contents []byte // Mode is the file permissions mode. Mode os.FileMode }
File is a test file.
type TempDir ¶ added in v0.3.0
type TempDir struct {
// contains filtered or unexported fields
}
TempDir is a temporary directory which is set up with a directory structure with some files for testing.
func NewTempDir ¶ added in v0.3.0
NewTempDir creates a new TempDir. This creates a new temporary directory and fills it with the files given. Intermediate directories are created automatically with 0700 permissions. This function panics if an error occurs when creating the files.
Click to show internal directories.
Click to hide internal directories.