safe

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package safe provides tools for safe programs

Index

Constants

This section is empty.

Variables

View Source
var DefaultRecover = func(err interface{}) {
	log.Printf("Error in goroutine: %s\nStack: %s\n", err, debug.Stack())
}

Functions

func Go

func Go(goroutine func())

Go starts a recoverable goroutine

func GoWithRecover

func GoWithRecover(goroutine func(), customRecover func(err interface{}))

GoWithRecover starts a recoverable goroutine using given customRecover() function

Types

This section is empty.

Jump to

Keyboard shortcuts

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