Documentation
¶
Overview ¶
Package errutil provides utility functions to handle errors.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JoinFnError ¶
JoinFnError appends the error returned by fn to the error pointed to by err.
Example ¶
package main
import (
"errors"
"fmt"
"github.com/tecnickcom/gogen/pkg/errutil"
)
func main() {
err := errors.New("original error")
fn := func() error {
return errors.New("function error")
}
errutil.JoinFnError(&err, fn)
fmt.Println(err)
}
Output: original error function error
Types ¶
Click to show internal directories.
Click to hide internal directories.