assert

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAssertData

func AddAssertData(key string, value AssertData)

func AddAssertFlush

func AddAssertFlush(flusher AssertFlush)

func Assert

func Assert(truth bool, msg string, data ...any)

TODO Think about passing around a context for debugging purposes

func Never

func Never(msg string, data ...any)

func Nil

func Nil(item any, msg string, data ...any)

func NoError

func NoError(err error, msg string, data ...any)

func NotNil

func NotNil(item any, msg string, data ...any)

func RemoveAssertData

func RemoveAssertData(key string)

Types

type AssertData

type AssertData interface {
	Dump() string
}

TODO using slog for logging

type AssertFlush

type AssertFlush interface {
	Flush()
}

Jump to

Keyboard shortcuts

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