safe – github.com/markbates/safe Index | Files

package safe

import "github.com/markbates/safe"

Index

Functions

func Run

func Run(fn RunFn) (err error)

Run the function safely knowing that if it panics the panic will be caught and returned as an error

Types

type Group

type Group struct {
	// contains filtered or unexported fields
}

func (*Group) Go

func (sg *Group) Go(fn RunFn)

func (*Group) Wait

func (sg *Group) Wait() error

type RunFn

type RunFn func() error

Source Files

group.go run.go

Version
v1.1.0 (latest)
Published
Feb 29, 2024
Platform
js/wasm
Imports
2 packages
Last checked
2 weeks ago

Tools for package owners.