util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package util provides utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchGoOrErr

func BatchGoOrErr(fs ...func() error) error

BatchGoOrErr starts multiple goroutines and returns the error once a goroutine stops with an error. CAUTION: Other goroutines aren't and won't be closed when a goroutine stops with an error. In other words, those still-running goroutines "leak" It is safe only when the error returned by BatchGoOrEr will eventually quit the program.

func GetFuncName

func GetFuncName(i interface{}) string

GetFuncName returns the name of the given function Reference: https://stackoverflow.com/a/7053871/12023612

func PanicIfErr

func PanicIfErr(e error)

PanicIfErr panics only if the given error is non-nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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