-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more tests for external libs and pkg/errors
- Loading branch information
1 parent
3508b37
commit 3db1e55
Showing
5 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package tests | ||
|
||
import ( | ||
"errors" | ||
"fmt" | ||
|
||
pkg_errors "github.com/pkg/errors" | ||
) | ||
|
||
var ( | ||
errExternalStdlib = errors.New("stdlib external error") | ||
errExternalPkgerr = pkg_errors.New("github.com/pkg/errors external error") | ||
) | ||
|
||
func externalError() error { | ||
return fmt.Errorf("external error wrapped with errorf: %w", errExternalStdlib) | ||
} | ||
|
||
func externalWrappedError() error { | ||
return pkg_errors.Wrap(errExternalPkgerr, "external error wrapped with pkg/errors") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters