Created
September 17, 2020 01:34
-
-
Save podhmo/180b1aee18c574e495030514e5f27c85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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