Skip to content

Commit 4550b2e

Browse files
committed
readability of the assert pkg main doc
1 parent a9a9c89 commit 4550b2e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

assert/doc.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,15 @@ raise up quality of our software.
4444
4545
"Assertions are active comments"
4646
47-
The package offers a convenient way to set preconditions to code which allow us
48-
detect programming errors and API violations faster. Still allowing
47+
The assert package offers a convenient way to set preconditions to code which
48+
allow us detect programming errors and API violations faster. Still allowing
4949
production-time error handling if needed. And everything is automatic. You can
50-
set proper asserter according to flag or environment variable. This allows
51-
developer, operator and every-day user share the exact same binary but get the
52-
error messages and diagnostic they need.
50+
set asserter with SetDefault function or --asserter flag if Go's flag package is
51+
in use. This allows developer, operator and every-day user share the exact same
52+
binary but get the error messages and diagnostic they need.
5353
54-
// add formatted caller info for normal errors coming from assertions
54+
// Production asserter adds formatted caller info to normal errors.
55+
// Information is transported thru error values when err2.Handle is in use.
5556
assert.SetDefault(assert.Production)
5657
5758
Please see the code examples for more information.

0 commit comments

Comments
 (0)