errgo

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: MIT Imports: 8 Imported by: 1 module, 18 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Go package to add trace back and message to golang errors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Msg

func Msg(err error, msg string) error

Msg replace error message.

func MsgNoTrace

func MsgNoTrace(err error, msg string) error

MsgNoTrace replace error message without adding trace. this is used to create global errors, which also avoid add trace.

func Trace

func Trace(err error) error

Trace add trace to error, without change error message.

func Wrap

func Wrap(err error, msg string) error

Wrap add context to error message.

func ZerologErrorMarshaler added in v0.0.4

func ZerologErrorMarshaler(err error) any

Types

type Stack added in v0.0.3

type Stack interface {
	Stack() string
}

Jump to

Keyboard shortcuts

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