diff --git a/README.md b/README.md index 04581e4..b2200c2 100644 --- a/README.md +++ b/README.md @@ -119,12 +119,11 @@ func TestOption(t *testing.T) { divide(2.0, 3.0). Inspect(func(x float64) { // Pattern match to retrieve the value - fmt.Println("Result:", x) + t.Log("Result:", x) }). InspectNone(func() { - fmt.Println("Cannot divide by 0") + t.Log("Cannot divide by 0") }) - } ``` diff --git a/examples/option/example_test.go b/examples/option/example_test.go index 43928e1..bc4aa8d 100644 --- a/examples/option/example_test.go +++ b/examples/option/example_test.go @@ -20,12 +20,11 @@ func TestOption(t *testing.T) { divide(2.0, 3.0). Inspect(func(x float64) { // Pattern match to retrieve the value - fmt.Println("Result:", x) + t.Log("Result:", x) }). InspectNone(func() { - fmt.Println("Cannot divide by 0") + t.Log("Cannot divide by 0") }) - } func ExampleOption() {