Skip to content

Instantly share code, notes, and snippets.

@marvinhosea
Created February 19, 2023 13:27
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 marvinhosea/1f2c5206865f17612afb0de0e098e671 to your computer and use it in GitHub Desktop.
Save marvinhosea/1f2c5206865f17612afb0de0e098e671 to your computer and use it in GitHub Desktop.
Bogus
package main
import (
"errors"
"fmt"
"log"
)
func main() {
err := errors.New("first error")
err2 := errors.New("second error")
wrappedErr1 := fmt.Errorf("combined: %w + %w", err, err2)
log.Println(wrappedErr1.Error())
log.Println(errors.Unwrap(wrappedErr1))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment