Documentation ¶
Index ¶
- func DecodeMultiSnapshots(raw []byte) (multiSnap, error)
- func EncodeMultiSnapshots(snaps multiSnap) ([]byte, error)
- func IsMultiSnapshots(filePath string) bool
- func ReadFile(path string) ([]byte, error)
- func RemoveFile(path string) error
- func SetLogger(slogr *slog.Logger)
- func SnapshotMatcher(snapFile string, options ...Option) *snapshotMatcher
- func WriteFile(path string, data []byte) error
- type DiffFunc
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeMultiSnapshots ¶ added in v0.3.0
func EncodeMultiSnapshots ¶ added in v0.3.0
func IsMultiSnapshots ¶ added in v0.3.0
func RemoveFile ¶ added in v0.3.0
func SnapshotMatcher ¶ added in v0.3.0
SnapshotMatcher returns a matcher that compares the actual value with the snapshot file.
Types ¶
type Option ¶
type Option func(m *snapshotMatcher)
Option is a functional option for snapshotMatcher.
func WithDiffFunc ¶ added in v0.3.0
func WithSnapshotID ¶ added in v0.3.0
WithSnapshotID is an option to specify the snapshot ID. If this option is set, the snapshot file is treated as a multi-snapshot file.
Click to show internal directories.
Click to hide internal directories.