• Daniel Martí's avatar
    testing: comment out flag.Parse from example · 11106492
    Daniel Martí authored
    The TestMain docs explain that flag.Parse() should be called if TestMain
    itself depends on command-line flags.
    
    The issue here is that the example implementation does not use any
    flags, and thus the flag.Parse call is unnecessary. This leads to people
    who use this example as a starting point for their own implementations
    to forget that the call is not necessary in most cases.
    
    Comment it out instead of removing the line to keep it as a reminder, as
    suggested by Minux Ma.
    
    Change-Id: I6ffc5413e7036366ae3cf0f069b7065e832a3b45
    Reviewed-on: https://go-review.googlesource.com/33273Reviewed-by: 's avatarMinux Ma <minux@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    11106492
Name
Last commit
Last update
..
internal/testdeps Loading commit data...
iotest Loading commit data...
quick Loading commit data...
allocs.go Loading commit data...
allocs_test.go Loading commit data...
benchmark.go Loading commit data...
benchmark_test.go Loading commit data...
cover.go Loading commit data...
example.go Loading commit data...
export_test.go Loading commit data...
match.go Loading commit data...
match_test.go Loading commit data...
sub_test.go Loading commit data...
testing.go Loading commit data...
testing_test.go Loading commit data...