Documentation
¶
Index ¶
- func Check(cond bool, statement string)
- func Checkf(cond bool, format string, args ...any)
- func SetViolationExecutor(exector ViolationExecutor)
- func Violate(statement string)
- func Violatef(format string, args ...any)
- type MockViolationExecutor
- type PanicViolationExecutor
- type ViolationError
- type ViolationExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetViolationExecutor ¶
func SetViolationExecutor(exector ViolationExecutor)
Types ¶
type MockViolationExecutor ¶
func NewMockViolationExecutor ¶
func NewMockViolationExecutor(t interface {
mock.TestingT
Cleanup(func())
}) *MockViolationExecutor
func (*MockViolationExecutor) Exec ¶
func (_m *MockViolationExecutor) Exec(_a0 ViolationError)
type PanicViolationExecutor ¶
type PanicViolationExecutor struct{}
func NewPanicViolationExecuter ¶
func NewPanicViolationExecuter() *PanicViolationExecutor
func (*PanicViolationExecutor) Exec ¶
func (executor *PanicViolationExecutor) Exec(err ViolationError)
type ViolationError ¶
type ViolationError struct {
Statement string
}
func (ViolationError) Error ¶
func (err ViolationError) Error() string
type ViolationExecutor ¶
type ViolationExecutor interface {
Exec(ViolationError)
}
Click to show internal directories.
Click to hide internal directories.