Created
September 19, 2020 00:03
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" | |
"log" | |
"golang.org/x/xerrors" | |
) | |
func main() { | |
log.Printf("! %v", f()) | |
log.Printf("!!%+v", f()) | |
} | |
func f() error { | |
return xerrors.Errorf("on f: %w", g()) | |
} | |
func g() error { | |
return xerrors.Errorf("on g: %w", h()) | |
} | |
func h() error { | |
return fmt.Errorf("hmm") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment