zutil

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: MIT Imports: 3 Imported by: 27

Documentation

Index

Constants

View Source
const BuffSize = 10 * 1024

Variables

This section is empty.

Functions

func CheckErr

func CheckErr(err error)

func GetBuff

func GetBuff() *bytes.Buffer

func IfVal

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

IfVal Simulate ternary calculations, pay attention to handling no variables or indexing problems

func PutBuff

func PutBuff(buffer *bytes.Buffer)

func Try

func Try(fn func(), catch func(e interface{}), finally ...func())

func WithLockContext

func WithLockContext(fn func())

func WithRunTimeContext

func WithRunTimeContext(closer func(), callback func(time.Duration))

Types

This section is empty.

Jump to

Keyboard shortcuts

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