pkg.errors.Capture returns a closure. This is meant to be used in a defer where the returned closure is called at defer-time so it must be Capture(args)() but there is no error if is it only Capture(arg) which does nothing useful at defer time.
|
func Capture(rErr *error, fn func() error) func() { |
Search for this mistake.