ternary

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package ternary implement like condition ? trueVal : falseVal

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func If

func If(condition bool, trueVal, falseVal interface{}) interface{}

If like condition ? trueVal : falseVal

func IfFloat

func IfFloat(condition bool, trueVal, falseVal float64) float64

IfFloat like condition ? trueVal : falseVal

func IfInt

func IfInt(condition bool, trueVal, falseVal int) int

IfInt like condition ? trueVal : falseVal

func IfInt64

func IfInt64(condition bool, trueVal, falseVal int64) int64

IfInt64 like condition ? trueVal : falseVal

func IfString

func IfString(condition bool, trueVal, falseVal string) string

IfString like condition ? trueVal : falseVal

Types

This section is empty.

Jump to

Keyboard shortcuts

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