1 // Copyright 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 // Additional routines compiled into the package only during testing.
14 // ResetForTesting clears all flag state and sets the usage function as directed.
15 // After calling ResetForTesting, parse errors in flag handling will not
17 func ResetForTesting(usage func()) {
18 CommandLine = &FlagSet{
20 errorHandling: ContinueOnError,
21 output: ioutil.Discard,
26 // GetCommandLine returns the default FlagSet.
27 func GetCommandLine() *FlagSet {