boolutil

package
v2.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: GPL-3.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package boolutil interprets the loosely-typed booleans that reach Core from user input: ZapScript arguments and traits, configuration values, and API payloads. It sits below pkg/helpers so packages that pkg/helpers itself depends on can share one definition of what counts as true.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFalsey

func IsFalsey(s string) bool

IsFalsey reports whether s is a negative written by a user.

This is not the negation of IsTruthy: a value that is neither affirmative nor negative, such as "maybe", is neither truthy nor falsey, so callers can tell "the user said no" apart from "the user said something unreadable".

func IsTruthy

func IsTruthy(s string) bool

IsTruthy reports whether s is an affirmative written by a user.

Types

This section is empty.

Jump to

Keyboard shortcuts

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