Skip to content

Commit

Permalink
Update example to use t.Fatalf to avoid repeated output
Browse files Browse the repository at this point in the history
  • Loading branch information
lesiw committed Jan 2, 2025
1 parent 2178332 commit 74c317a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ func TestTlsConfigClone(t *testing.T) {
cfg := new(tls.Config)
fill.Rand(cfg)
if want, got := cfg, cfg.Clone(); !cmp.Equal(want, got, opts) {
t.Errorf("-original +cloned\n%s", cmp.Diff(want, got, opts))
t.Fatalf("-original +cloned\n%s", cmp.Diff(want, got, opts))
}
}
}
```

[▶️ Run this example on the Go Playground](https://go.dev/play/p/x4nNbRdHyZb)
[▶️ Run this example on the Go Playground](https://go.dev/play/p/87V0mJqv5qu)

0 comments on commit 74c317a

Please sign in to comment.