conditions

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultIfNil

func DefaultIfNil(value interface{}, defaultValue interface{}) interface{}

If the value is not nil, return the value, otherwise return the default value

func IfThen

func IfThen(condition bool, a interface{}) interface{}

If the condition is true, return the first argument, otherwise return nil.

func IfThenElse

func IfThenElse(condition bool, a interface{}, b interface{}) interface{}

If the condition is true, return a, otherwise return b.

Types

This section is empty.

Jump to

Keyboard shortcuts

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