Skip to content

Instantly share code, notes, and snippets.

@podhmo
Created September 19, 2020 00:03
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