Skip to content

Instantly share code, notes, and snippets.

@podhmo
Created September 17, 2020 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save podhmo/180b1aee18c574e495030514e5f27c85 to your computer and use it in GitHub Desktop.
Save podhmo/180b1aee18c574e495030514e5f27c85 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"io"
"github.com/k0kubun/pp"
"golang.org/x/xerrors"
)
func main() {
err := xerrors.Errorf("xxx: %w", xerrors.Errorf("yyy: %w", io.EOF))
fmt.Printf("!! %+v\n", err)
pp.Println(err)
// &xerrors.wrapError{
// msg: "xxx",
// err: &xerrors.wrapError{
// msg: "yyy",
// err: &errors.errorString{
// s: "EOF",
// },
// frame: xerrors.Frame{
// frames: [3]uintptr{
// 0x10cc030,
// 0x10cde4d,
// 0x1031e0a,
// },
// },
// },
// frame: xerrors.Frame{
// frames: [3]uintptr{
// 0x10cc030,
// 0x10cdea7,
// 0x1031e0a,
// },
// },
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment