miscutil

package
v0.0.0-...-1f663c5 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2020 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Float32Ty = reflect.TypeOf(float32(0))
View Source
var Float64Ty = reflect.TypeOf(float64(0))
View Source
var IntTy = reflect.TypeOf(int(0))
View Source
var Uint64Ty = reflect.TypeOf(uint64(0))
View Source
var Uint8Ty = reflect.TypeOf(uint8(0))

Functions

func Assert

func Assert(v interface{}, info string, args ...interface{})

func ErrPrint

func ErrPrint(err error, args ...interface{}) error

func FileExist

func FileExist(fname string) bool

func IfElse

func IfElse(q bool, tv interface{}, fv interface{}) interface{}

TODO 要是侯选可以惰性求值就好了,否则在只能一个求值的场景则会有问题 简单的三元去处模拟函数

func IfElseInt

func IfElseInt(q bool, tv int, fv int) int

func IfElseStr

func IfElseStr(q bool, tv string, fv string) string

func NilPrint

func NilPrint(v interface{}, args ...interface{}) interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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