condition

package
v0.0.0-...-cc0701e Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChanClosed

func ChanClosed(ch chan struct{}) bool

If a channel is closed

func DefaultIfNil

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

DefaultIfNil checks if the value is nil, if true returns the default value otherwise the original

func FirstNonNil

func FirstNonNil(values ...interface{}) interface{}

FirstNonNil returns the first non nil parameter

func IfThen

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

IfThen evaluates a condition, if true returns the parameters otherwise nil

func IfThenElse

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

IfThenElse evaluates a condition, if true returns the first parameter otherwise the second

Types

This section is empty.

Jump to

Keyboard shortcuts

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