File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,15 @@ error messages and diagnostic they need.
52
52
53
53
Please see the code examples for more information.
54
54
55
+ # Flag Package Support
56
+
57
+ The assert package supports Go's flags. All you need to do is to call flag.Parse.
58
+ And the following flags are supported (="default-value"):
59
+ -asserter="Prod"
60
+ A name of the asserter Plain, Prod, Dev, Debug (see constants)
61
+
62
+ And assert package's configuration flags are inserted.
63
+
55
64
Note. assert.That's performance is equal to the if-statement. Most of the
56
65
generics-based versions are almost as fast. If your algorithm is
57
66
performance-critical please run `make bench` in the err2 repo and decide case by
Original file line number Diff line number Diff line change @@ -89,6 +89,17 @@ tracer API:
89
89
90
90
err2.SetLogTracer(nil) // the default is nil where std log pkg is used.
91
91
92
+ # Flag Package Support
93
+
94
+ The err2 package supports Go's flags. All you need to do is to call flag.Parse.
95
+ And the following flags are supported (="default-value"):
96
+ -err2-log="nil"
97
+ A name of the stream currently supported stderr, stdout or nil
98
+ -err2-panic-trace="stderr"
99
+ A name of the stream currently supported stderr, stdout or nil
100
+ -err2-trace="nil"
101
+ A name of the stream currently supported stderr, stdout or nil
102
+
92
103
# Error handling
93
104
94
105
Package err2 relies on declarative control structures to achieve error and panic
You can’t perform that action at this time.
0 commit comments