Try this out
package main
import (
"errors"
)
func somethingDangerous() error {
return errors.New("fake err")
}
func run() (err error) {
err = somethingDangerous()
return
}
func main() {
if err := run(); err != nil {
println(err)
}
}
You'll see that wrap check does not detect that err is not being wrapped.
Try this out
You'll see that wrap check does not detect that
erris not being wrapped.