assertor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package assertor provides a simple multi-error validator for constructor params.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assertor

type Assertor struct {
	// contains filtered or unexported fields
}

Assertor collects validation failures.

func New

func New() *Assertor

New returns a fresh Assertor.

func (*Assertor) Assert

func (a *Assertor) Assert(cond bool, msg string)

Assert adds msg to the failure list when cond is false.

func (*Assertor) Validate

func (a *Assertor) Validate() error

Validate returns an error joining all failures, or nil if none.

Jump to

Keyboard shortcuts

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