Skip to content

kevin2027/merrors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages