File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -19,16 +19,13 @@ var (
19
19
"\n play-recursion (= runs recursion example)" ,
20
20
)
21
21
isErr = flag .Bool ("err" , false , "tells if we want to have an error" )
22
+ rmTry = flag .Bool ("rm-try" , false , "remove Try prefix from errors" )
22
23
)
23
24
24
25
func init () {
25
26
// highlight that this is before flag.Parse to allow it to work properly.
26
27
err2 .SetLogTracer (os .Stderr ) // for import
27
28
err2 .SetLogTracer (nil )
28
-
29
- // select which one you want to play with
30
- err2 .SetFormatter (formatter .DecamelAndRmTryPrefix )
31
- // err2.SetFormatter(formatter.Decamel)
32
29
}
33
30
34
31
func main () {
@@ -37,6 +34,12 @@ func main() {
37
34
38
35
flag .Parse ()
39
36
37
+ if * rmTry {
38
+ // select which one you want to play with
39
+ err2 .SetFormatter (formatter .DecamelAndRmTryPrefix )
40
+ // err2.SetFormatter(formatter.Decamel)
41
+ }
42
+
40
43
switch * mode {
41
44
case "db" :
42
45
doDBMain ()
You can’t perform that action at this time.
0 commit comments