File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,15 @@ raise up quality of our software.
44
44
45
45
"Assertions are active comments"
46
46
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
49
49
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.
53
53
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.
55
56
assert.SetDefault(assert.Production)
56
57
57
58
Please see the code examples for more information.
You can’t perform that action at this time.
0 commit comments