fas

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil added in v1.3.1

func IsNil(a any) bool

func Max

func Max[T Comparable](a, b T) T

func Min

func Min[T Comparable](a, b T) T

func TernaryOp

func TernaryOp[T any](condition bool, a, b T) T

TernaryOp is ternary operation like max = a > b ? a : b

func TernaryOpNil

func TernaryOpNil[T any](condition bool, a, b func() T) T

Types

type Comparable

type Comparable interface {
	Uint | Int | Float | ~string | ~byte | ~rune
}

type Float

type Float interface {
	~float32 | ~float64
}

type Int

type Int interface {
	~int8 | ~int16 | ~int32 | ~int64 | ~int
}

type Uint

type Uint interface {
	~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uint | ~uintptr
}

Jump to

Keyboard shortcuts

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