@@ -62,7 +62,7 @@ func CopyFile(src, dst string) (err error) {
62
62
- The ` err2 ` (main) package includes declarative error handling functions.
63
63
- The ` try ` package offers error checking functions.
64
64
- The ` assert ` package implements assertion helpers for ** both** unit-testing
65
- and * design-by-contract* .
65
+ and * design-by-contract* with the * same API and cross-usage * .
66
66
67
67
## Performance
68
68
@@ -302,8 +302,10 @@ development where you set pre- and post-conditions for *all* of your functions,
302
302
> It works *both runtime and for tests.* And even better, same asserts work in
303
303
> both running modes.
304
304
305
+ #### Asserters
306
+
305
307
<details>
306
- <summary>Fast Clean Code</summary>
308
+ <summary>Fast Clean Code with Asserters </summary>
307
309
<br/>
308
310
309
311
Asserts are not meant to replace the normal error checking but speed up the
@@ -312,10 +314,6 @@ value that includes a formatted and detailed assertion violation message. A
312
314
developer gets immediate and proper feedback independently of the running mode,
313
315
allowing very fast feedback cycles.
314
316
315
- </details>
316
-
317
- #### Asserters
318
-
319
317
The assert package offers a few pre-build *asserters*, which are used to
320
318
configure *how the assert package deals with assert violations*. The line below
321
319
exemplifies how the default asserter is set in the package. (See the
@@ -336,6 +334,8 @@ defer assert.PushAsserter(assert.Plain)()
336
334
This is especially good if you want to use assert functions for CLI's flag
337
335
validation or you want your app behave like legacy Go programs.
338
336
337
+ </details>
338
+
339
339
> [!NOTE]
340
340
> Since v0.9.5 you can set these asserters through Go's standard flag package
341
341
> just by adding ` flag.Parse ()` to your program. See more information from
0 commit comments