useful

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogError

func LogError(action func() error)

LogError if the passed error is not nil, log it and move on this function is useful for example in the case of deferred executions, where we want to let the user know something happened, but do not necessarily want to stop the application

func PanicOnUnrecoverableError

func PanicOnUnrecoverableError(err error)

PanicOnUnrecoverableError if the passed error is not nil, panic as the system cannot directly recover from it this is a helper for avoiding the _if err!=nil then return err_ pattern, which in the case of certain classes of errors, would only make the code harder to read

Types

This section is empty.

Jump to

Keyboard shortcuts

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