Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Extension that is added to the name of the input file to identify the // matching golden file. Extension = ".golden" // BasePath is put in front of paths passed to any of the Dir* functions. BasePath = "." // ChannelSize used by Dir() is arbitrary ┐( ̄ヘ ̄)┌ ChannelSize = 32 )
Functions ¶
Types ¶
type Case ¶
Case provides input and expected output for a single test case.
func DirSlice ¶
DirSlice returns a Case slice from a given directory.
Any errors while walking the file system will fail and are not ignored.
type File ¶
File provides read/write access to test files.
func (File) Bytes ¶
Bytes returns the content as a byte slice.
It will fail when the file could not be read.
func (File) Reader ¶
func (f File) Reader() io.ReadCloser
Reader returns a ReadCloser.
This is basically os.File: remember to call Close(), especially if you have many files or read them multiple times.
Click to show internal directories.
Click to hide internal directories.