merrors

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: MIT Imports: 4 Imported by: 0

README

merrors

将fmt.Errorf输出为调用栈的字符串

安装

  go get -u github.com/kevin2027/merrors

引入代码

import (
    "github.com/kevin2027/merrors"
)

使用

err:=MyFunction(arg1, arg2)
fmt.Printf("%s\n", merrors.String(err))

打印结果

new error: error call
/Users/dz0401008/projects/merrors/merrors_test.go:func1:14: new error: error call
/Users/dz0401008/projects/merrors/merrors_test.go:TestString:21: error call

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String(err error) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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