errgo

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: MIT Imports: 6 Imported by: 18

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.

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