builtinhelper

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: MIT Imports: 3 Imported by: 0

README

builtinhelper

Go Reference

Helpers for Go's builtin package.

Documentation

Overview

Package builtinhelper contains helpers for [builtin] package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PanicToError

func PanicToError(panicArg any, err *error)

PanicToError converts panic to error in the following way:

PanicToError must be called from a defer statement:

func Example() (err error) {
  defer func() {
    PanicToError(recover(), &err)
  }()
  return nil
}

(See tests.)

Types

This section is empty.

Jump to

Keyboard shortcuts

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