defers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleDeferError

func HandleDeferError(deferredFunc func() error, errPtr *error)

HandleDeferError calls a deferred function and updates the provided error pointer with any error that occurs during the call. Argument requirements:

  • The deferred function MUST NOT be nil; if it is nil, an error is logged.
  • The error pointer MUST NOT be nil; if it is nil, an error is logged. The passed error will be preserved but may be wrapped in a new error that includes the error from the deferred function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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