Add gmyerr package
This commit is contained in:
parent
fbd3c39aa9
commit
c108b43cfd
12
gmyerr/wrapper.go
Normal file
12
gmyerr/wrapper.go
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
package gmyerr
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
func WrapPrefix(prefix string, err error) error {
|
||||||
|
if err == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return fmt.Errorf("%s: %w", prefix, err)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user