boollib

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallOn

func CallOn(cond bool, fn ErrFunc) error

CallOn call func on condition is true

func CallOrElse

func CallOrElse(cond bool, okFn, elseFn ErrFunc) error

CallOrElse call okFunc() on condition is true, else call elseFn()

func ToInteger

func ToInteger[T constraints.Integer](b bool) T

Types

type ErrFunc

type ErrFunc func() error

ErrFunc type

Jump to

Keyboard shortcuts

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