util_test

package
v0.51.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyFormat

func PrettyFormat(v interface{}) string

PrettyFormat formats any objects for test debug use.

Types

type TestData added in v0.40.0

type TestData struct {
	FilePath   string
	OriginData []byte
}

TestData is a wrapped test file.

func NewTestData added in v0.40.0

func NewTestData(
	filePath string,
) (TestData, error)

NewTestData create a new TestData.

func (TestData) Data added in v0.40.0

func (d TestData) Data() ([]byte, error)

Data returns a content.

func (TestData) Restore added in v0.40.0

func (d TestData) Restore() error

Restore writes the original content back to the file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL