asserts

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR_MSG = "expected %v, got %v"

Variables

This section is empty.

Functions

func DeepEqual

func DeepEqual[T comparable](t Tester, expected, result T)

func Equal

func Equal[T comparable](t Tester, expected T, result T)

func GetFieldNames

func GetFieldNames[T any](obj T) []string

func IsInterfaceNil

func IsInterfaceNil(value interface{}) bool

func IsStruct

func IsStruct[T any](expected T) bool

func Slices

func Slices[T comparable](t Tester, expectedSlice []T, resultSlice []T)

func StringifyedStruct

func StringifyedStruct[T any](expected T) string

func StructToMap

func StructToMap(in interface{}) map[string]interface{}

Types

type Tester

type Tester interface {
	Errorf(format string, args ...interface{})
}

Jump to

Keyboard shortcuts

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