Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
fix import cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
kubasobon committed Nov 20, 2021
1 parent 00384f8 commit 39730c7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions errors_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@ package errors

import (
"log"

"github.com/kubasobon/errors"
)

func ExampleMaskf() {
c := func() error {
return errors.New("If you see this - it's working")
return New("If you see this - it's working")
}

b := func() error {
if err := c(); err != nil {
return errors.Maskf(err, "b error")
return Maskf(err, "b error")
}
return nil
}

a := func() error {
if err := b(); err != nil {
return errors.Maskf(err, "a error")
return Maskf(err, "a error")
}
return nil
}
Expand Down

0 comments on commit 39730c7

Please sign in to comment.