Skip to content

Commit

Permalink
test: added local FailToDoSomething in an example of Err (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
sttk authored Aug 3, 2023
1 parent 121958b commit c340df8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example_err_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ func ExampleErr_Unwrap() {
}

func ExampleErr_IfOk() {
type FailToDoSomething struct{}

err := sabi.Ok()
err.IfOk(func() sabi.Err {
fmt.Println("execute if non error.")
Expand Down

0 comments on commit c340df8

Please sign in to comment.