cstest

package
v1.5.43 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const FileNotFoundMessage = "no such file or directory"

Variables

This section is empty.

Functions

func AssertErrorContains

func AssertErrorContains(t *testing.T, err error, expectedErr string)

func AssertErrorMessage

func AssertErrorMessage(t *testing.T, err error, expectedErr string)

func Interpolate

func Interpolate(s string, data interface{}) (string, error)

Interpolate fills a string template with the given values, can be map or struct. example: Interpolate("{{.Name}}", map[string]string{"Name": "JohnDoe"})

func RequireErrorContains

func RequireErrorContains(t *testing.T, err error, expectedErr string)

func RequireErrorMessage

func RequireErrorMessage(t *testing.T, err error, expectedErr string)

func RequireLogContains

func RequireLogContains(t *testing.T, hook *logtest.Hook, expected string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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