safego

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHandler = func(err interface{}) {
	fmt.Fprintf(os.Stderr, "recovered: %s\n%s", err, CallStack(3))
}

Functions

func CallStack

func CallStack(skip int) []byte

func Go

func Go(f func(), handler ...Handler)

func GoWithArgs

func GoWithArgs(f func(args ...interface{}), args ...interface{})

func GoWithHandler

func GoWithHandler(f func(args ...interface{}), handler Handler, args ...interface{})

GoWithHandler will run function f(args... interface{}) in a go routines. And handler the panic if occur with given handler.

Types

type Handler

type Handler func(err interface{})

Jump to

Keyboard shortcuts

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