Skip to content

Commit b755bca

Browse files
committed
Update deps
1 parent c2d1485 commit b755bca

File tree

4 files changed

+26
-12
lines changed

4 files changed

+26
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88

9-
## [Unreleased](https://github.com/gravitton/errors/compare/v0.1.0...master)
9+
## [Unreleased](https://github.com/gravitton/errors/compare/v1.0.0...master)
1010

1111

12-
## v0.1.0 (2025-08-03)
12+
## v1.0.0 (2025-10-17)
1313
### Added
14+
- `DataError` with additional context fields and cause error
15+
- `MultiError` concurrent safe multi error

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,23 @@ go get github.com/gravitton/errors
2121

2222
## Usage
2323

24+
25+
```go
26+
package main
27+
28+
import (
29+
"github.com/gravitton/errors"
30+
)
31+
32+
func Process() error {
33+
if err := subProcess(); err != nil {
34+
return errors.Wrap(err).WithField("process", "abc").WithCause(err)
35+
}
36+
37+
return errors.Newf("this should not happen %s", "again")
38+
}
39+
```
40+
2441
```go
2542
package main
2643

@@ -32,13 +49,8 @@ import (
3249
func Process() error {
3350
errs := errors.NewMulti()
3451

35-
if err := process1(); err != nil {
36-
errs.Append(err)
37-
}
38-
39-
if err := process2(); err != nil {
40-
errs.Append(err)
41-
}
52+
errs.Append(process(1))
53+
errs.Append(process(2))
4254

4355
return errs.ErrorOrNil()
4456
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module github.com/gravitton/errors
22

33
go 1.25
44

5-
require github.com/gravitton/assert v0.5.0
5+
require github.com/gravitton/assert v1.0.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github.com/gravitton/assert v0.5.0 h1:7HW4+nagmtDEI7ZMBjeZo/sBJTNnxtWGoVw/Vxe1VUU=
2-
github.com/gravitton/assert v0.5.0/go.mod h1:wQGHJvwsxQQ7qdX++NLofrI2cJvYIdJJtAo7A15qcAY=
1+
github.com/gravitton/assert v1.0.0 h1:VhxPuIN6KNpDXIdMtoKa0tGB/bkxZ0h1mm6jTzBkhnc=
2+
github.com/gravitton/assert v1.0.0/go.mod h1:wQGHJvwsxQQ7qdX++NLofrI2cJvYIdJJtAo7A15qcAY=

0 commit comments

Comments
 (0)