Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RepoBaseDir string
RepoBaseDir contains the absolute path to the root of the repository on disk. This is determined by searching up the directory tree until a file called go.mod appears in the current directory.
var RepoBasePkg string
RepoBasePkg contains the name of the module (eg github.com/myuser/someproj)
Functions ¶
func FromGolden ¶
func FromGolden(name string, val interface{})
FromGolden gob decodes <name>.golden in the caller's directory into val
func Testdata ¶
func Testdata(path string) (io.ReadCloser, error)
Testdata fetches a testdata file. The path should be relative to the /test/testdata directory.
func TestdataFromJSON ¶
func TestdataFromJSON(path string, target interface{})
TestdataFromJSON fetches a testdata file and decodes it into a type. The path should be compatible with Testdata(), and the target should be compatible with Golang's json.Unmarshal().
func TestdataResponder ¶
func TestdataResponder(url, testdata string)
TestdataReponder registers an httpmock responder that responds with the given testdata.
Types ¶
This section is empty.