堆栈跟踪和源片段的Golang错误 厌倦了错误的错误输出? 也许这会更方便: 例 package main import ( "io/ioutil" "github.com/ztrue/tracerr" ) func main () { if err := read (); err != nil { tracerr . PrintSourceColor ( err ) } } func read () error { return readNonExistent () } func readNonExistent () error { _ , err := ioutil .