Versions in this module Expand all Collapse all v0 v0.0.2 Jul 31, 2023 v0.0.1 Jul 3, 2023 Changes in this version + func Diff(engine DiffEngine, actual string, expected string) (diff string) + type DiffEngine int + const ClassicDiff + const ColoredDiff + const Simple + const UndefinedDiff + type DiffFn func(actual string, expected string) string + type Goldie struct + func New(t *testing.T, options ...Option) *Goldie + func (g *Goldie) Assert(t *testing.T, name string, actualData []byte) + func (g *Goldie) AssertJson(t *testing.T, name string, actualJsonData interface{}) + func (g *Goldie) AssertWithTemplate(t *testing.T, name string, data interface{}, actualData []byte) + func (g *Goldie) AssertXml(t *testing.T, name string, actualXmlData interface{}) + func (g *Goldie) GoldenFileName(t *testing.T, name string) string + func (g *Goldie) Update(t *testing.T, name string, actualData []byte) error + func (g *Goldie) WithDiffEngine(engine DiffEngine) error + func (g *Goldie) WithDiffFn(fn DiffFn) error + func (g *Goldie) WithDirPerms(mode os.FileMode) error + func (g *Goldie) WithFilePerms(mode os.FileMode) error + func (g *Goldie) WithFixtureDir(dir string) error + func (g *Goldie) WithIgnoreTemplateErrors(ignoreErrors bool) error + func (g *Goldie) WithNameSuffix(suffix string) error + func (g *Goldie) WithSubTestNameForDir(use bool) error + func (g *Goldie) WithTestNameForDir(use bool) error + type Option func(OptionProcessor) error + func WithDiffEngine(engine DiffEngine) Option + func WithDiffFn(fn DiffFn) Option + func WithDirPerms(mode os.FileMode) Option + func WithFilePerms(mode os.FileMode) Option + func WithFixtureDir(dir string) Option + func WithIgnoreTemplateErrors(ignoreErrors bool) Option + func WithNameSuffix(suffix string) Option + func WithSubTestNameForDir(use bool) Option + func WithTestNameForDir(use bool) Option + type OptionProcessor interface + WithDiffEngine func(engine DiffEngine) error + WithDiffFn func(fn DiffFn) error + WithDirPerms func(mode os.FileMode) error + WithFilePerms func(mode os.FileMode) error + WithFixtureDir func(dir string) error + WithIgnoreTemplateErrors func(ignoreErrors bool) error + WithNameSuffix func(suffix string) error + WithSubTestNameForDir func(use bool) error + WithTestNameForDir func(use bool) error + type Tester interface + Assert func(t *testing.T, name string, actualData []byte) + AssertJson func(t *testing.T, name string, actualJsonData interface{}) + AssertWithTemplate func(t *testing.T, name string, data interface{}, actualData []byte) + AssertXml func(t *testing.T, name string, actualXmlData interface{}) + GoldenFileName func(t *testing.T, name string) string + Update func(t *testing.T, name string, actualData []byte) error