safego

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHandler = func(err interface{}) {
	log.ErrorStack(context.Background(), err)
}

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