diff options
author | Runxi Yu <me@runxiyu.org> | 2025-01-04 21:13:40 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-01-04 21:14:26 +0800 |
commit | 7a480ad159b93b06223d9298424dc14472ddf8c9 (patch) | |
tree | 5c5934f17ab11fb01d8175fe46fce08c58528baa /misc | |
parent | misc: Fix documentation comment notation (diff) | |
download | go-lindenii-common-7a480ad159b93b06223d9298424dc14472ddf8c9.tar.gz go-lindenii-common-7a480ad159b93b06223d9298424dc14472ddf8c9.tar.zst go-lindenii-common-7a480ad159b93b06223d9298424dc14472ddf8c9.zip |
misc: Wrap_one_error
Diffstat (limited to 'misc')
-rw-r--r-- | misc/errors.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/misc/errors.go b/misc/errors.go new file mode 100644 index 0000000..5c22a20 --- /dev/null +++ b/misc/errors.go @@ -0,0 +1,7 @@ +package misc + +import "fmt" + +func Wrap_one_error(a error, b error) error { + return fmt.Errorf("%w: %w", a, b) +} |