truthy

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package truthy implements helpers to test the truthy-ness of the values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FalseOnError

func FalseOnError(res bool, err error) bool

FalseOnError returns false if err is not nil, otherwise it returns res.

func Is

func Is(val string) (bool, error)

Is returns `false` if the argument sounds like "false" (empty string, "0", "f", "false", and so on), and `true` otherwise.

func TrueOnError

func TrueOnError(res bool, err error) bool

TrueOnError returns true if err is not nil, otherwise it returns res.

Types

This section is empty.

Jump to

Keyboard shortcuts

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