decorate

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: GPL-3.0, LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package decorate contains various helpers to decorate errors with fewer lines of code in functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogFuncOnError

func LogFuncOnError(f func() error)

LogFuncOnError logs only any errors returned by f without failing.

func LogFuncOnErrorContext

func LogFuncOnErrorContext(ctx context.Context, f func() error)

LogFuncOnErrorContext logs only error returned by f without failing. It takes a context.

func LogOnError

func LogOnError(err error)

LogOnError logs only any errors without failing.

func LogOnErrorContext

func LogOnErrorContext(ctx context.Context, err error)

LogOnErrorContext logs any errors without failing. It takes a context.

func OnError

func OnError(err *error, format string, args ...interface{})

OnError prefixes any error with format/args.

Types

This section is empty.

Jump to

Keyboard shortcuts

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