Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,17 +0,0 @@ |
| 1 |
-// Copyright 2014 The Docker & 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. |
|
| 4 |
- |
|
| 5 |
-package mflag |
|
| 6 |
- |
|
| 7 |
-import "os" |
|
| 8 |
- |
|
| 9 |
-// Additional routines compiled into the package only during testing. |
|
| 10 |
- |
|
| 11 |
-// ResetForTesting clears all flag state and sets the usage function as directed. |
|
| 12 |
-// After calling ResetForTesting, parse errors in flag handling will not |
|
| 13 |
-// exit the program. |
|
| 14 |
-func ResetForTesting(usage func()) {
|
|
| 15 |
- CommandLine = NewFlagSet(os.Args[0], ContinueOnError) |
|
| 16 |
- Usage = usage |
|
| 17 |
-} |
| ... | ... |
@@ -15,6 +15,13 @@ import ( |
| 15 | 15 |
"time" |
| 16 | 16 |
) |
| 17 | 17 |
|
| 18 |
+// ResetForTesting clears all flag state and sets the usage function as directed. |
|
| 19 |
+// After calling ResetForTesting, parse errors in flag handling will not |
|
| 20 |
+// exit the program. |
|
| 21 |
+func ResetForTesting(usage func()) {
|
|
| 22 |
+ CommandLine = NewFlagSet(os.Args[0], ContinueOnError) |
|
| 23 |
+ Usage = usage |
|
| 24 |
+} |
|
| 18 | 25 |
func boolString(s string) string {
|
| 19 | 26 |
if s == "0" {
|
| 20 | 27 |
return "false" |