Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hedzr committed Feb 16, 2022
1 parent 6e34c56 commit 4046856
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ For example:

```go
func a() (err error){
container = errors.NewContainer("sample error")
container = errors.NewContainer("sample error")
defer container.Defer(&err) // wraps the errors in container to err and return it

// ...
for {
// ...
Expand All @@ -87,9 +89,9 @@ func a() (err error){
// container.Attach(someFuncReturnsErr(xxx))
// ... break
}
// and we extract all of them as a single parent error object now.
err = container.Error()
return
// // and we extract all of them as a single parent error object now.
// err = container.Error()
return
}

func b(){
Expand Down

0 comments on commit 4046856

Please sign in to comment.