Discover Packages
github.com/dottermi/termitest
internal
golden
package
Version:
v0.0.3
Opens a new window with list of versions in this module.
Published: Jan 15, 2026
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package golden provides shared golden file testing logic for assert and require packages.
func FormatMsgAndArgs(msgAndArgs ...any ) string
FormatMsgAndArgs formats the message and arguments like fmt.Sprintf.
type Result struct {
Passed bool
Error error
}
Result contains the outcome of a golden file comparison.
Check compares got against the golden file for the current test.
If the golden file doesn't exist, it creates it automatically.
Returns a Result indicating success or failure.
type TestingT interface {
Errorf(format string , args ...any )
Helper()
Name() string
}
TestingT is the minimal interface required for assertions.
It is satisfied by *testing.T and *testing.B.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.