conditional

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(
	isTrue bool,
	trueValue, falseValue bool,
) bool

func BoolByOrder added in v0.4.1

func BoolByOrder(
	booleans ...bool,
) bool

BoolByOrder returns the first boolean which is true

func BoolFunc added in v0.3.8

func BoolFunc(
	isTrue bool,
	trueValueFunc, falseValueFunc func() bool,
) bool

func BoolFunctionsByOrder added in v0.4.1

func BoolFunctionsByOrder(
	boolFunctions ...func() bool,
) bool

BoolFunctionsByOrder returns the first func which is true and don't execute others.

func Booleans added in v0.3.8

func Booleans(
	isTrue bool,
	trueValue, falseValue []bool,
) []bool

func BooleansPtr added in v0.3.8

func BooleansPtr(
	isTrue bool,
	trueValue, falseValue *[]bool,
) *[]bool

func Byte

func Byte(
	isTrue bool,
	trueValue, falseValue byte,
) byte

func Bytes added in v0.0.8

func Bytes(
	isTrue bool,
	trueValue, falseValue []byte,
) []byte

func BytesPtr added in v0.0.8

func BytesPtr(
	isTrue bool,
	trueValue, falseValue *[]byte,
) *[]byte

func Func added in v0.3.8

func Func(
	isTrue bool,
	trueValueFunc, falseValueFunc func() interface{},
) func() interface{}

func Int

func Int(
	isTrue bool,
	trueValue, falseValue int,
) int

func Integers added in v0.3.8

func Integers(
	isTrue bool,
	trueValue, falseValue []int,
) []int

func IntegersPtr added in v0.3.8

func IntegersPtr(
	isTrue bool,
	trueValue, falseValue *[]int,
) *[]int

func IntegersPtrFunc added in v0.3.8

func IntegersPtrFunc(
	isTrue bool,
	trueValueFunc, falseValueFunc func() *[]int,
) *[]int

func Interface

func Interface(
	isTrue bool,
	trueValue, falseValue interface{},
) interface{}

func InterfaceFunc added in v0.3.8

func InterfaceFunc(
	isTrue bool,
	trueValueFunc, falseValueFunc func() interface{},
) interface{}

func Interfaces added in v0.0.8

func Interfaces(
	isTrue bool,
	trueValue, falseValue []interface{},
) []interface{}

func InterfacesPtr added in v0.0.8

func InterfacesPtr(
	isTrue bool,
	trueValue, falseValue *[]interface{},
) *[]interface{}

func Setter added in v0.0.8

func Setter(
	isTrue bool,
	trueValue, falseValue issetter.Value,
) interface{}

func String

func String(
	isTrue bool,
	trueValue, falseValue string,
) string

func StringFunc added in v0.3.8

func StringFunc(
	isTrue bool,
	trueValueFunc, falseValueFunc func() string,
) string

func StringPtr

func StringPtr(
	isTrue bool,
	trueValue, falseValue *string,
) *string

func Strings added in v0.0.8

func Strings(
	isTrue bool,
	trueValue, falseValue []string,
) []string

func StringsIndexVal added in v0.5.1

func StringsIndexVal(
	isTrue bool,
	slice []string,
	trueValue, falseValue int,
) string

func StringsPtr added in v0.0.8

func StringsPtr(
	isTrue bool,
	trueValue, falseValue *[]string,
) *[]string

Types

This section is empty.

Jump to

Keyboard shortcuts

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