aboutsummaryrefslogtreecommitdiff
path: root/flag_test.go
diff options
context:
space:
mode:
authorEric Paris <[email protected]>2015-08-15 14:22:16 -0500
committerEric Paris <[email protected]>2015-08-15 14:22:16 -0500
commitccad0e1b8d442b5291ebbaa7d4f3b345a9dbfe65 (patch)
tree98409d6f5f56049df54b18a9fc577cf38dff8bae /flag_test.go
parentda10e08318b7b4c0105c4df757cb1f997f439f4a (diff)
parent0692da7b4fa7568c62b505a313ee44a5256ee7f4 (diff)
Merge pull request #46 from eparis/goreportcard
Fix up minor things found by goreportcard.com
Diffstat (limited to 'flag_test.go')
-rw-r--r--flag_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/flag_test.go b/flag_test.go
index e654553..9ff1934 100644
--- a/flag_test.go
+++ b/flag_test.go
@@ -19,15 +19,15 @@ import (
)
var (
- test_bool = Bool("test_bool", false, "bool value")
- test_int = Int("test_int", 0, "int value")
- test_int64 = Int64("test_int64", 0, "int64 value")
- test_uint = Uint("test_uint", 0, "uint value")
- test_uint64 = Uint64("test_uint64", 0, "uint64 value")
- test_string = String("test_string", "0", "string value")
- test_float64 = Float64("test_float64", 0, "float64 value")
- test_duration = Duration("test_duration", 0, "time.Duration value")
- test_optional_int = Int("test_optional_int", 0, "optional int value")
+ testBool = Bool("test_bool", false, "bool value")
+ testInt = Int("test_int", 0, "int value")
+ testInt64 = Int64("test_int64", 0, "int64 value")
+ testUint = Uint("test_uint", 0, "uint value")
+ testUint64 = Uint64("test_uint64", 0, "uint64 value")
+ testString = String("test_string", "0", "string value")
+ testFloat = Float64("test_float64", 0, "float64 value")
+ testDuration = Duration("test_duration", 0, "time.Duration value")
+ testOptionalInt = Int("test_optional_int", 0, "optional int value")
normalizeFlagNameInvocations = 0
)
@@ -291,7 +291,7 @@ func testParse(f *FlagSet, t *testing.T) {
t.Error("mask flag should be 255.255.255.0, is ", (*maskFlag).String())
}
if v, err := f.GetIPv4Mask("mask"); err != nil || v.String() != (*maskFlag).String() {
- t.Errorf("GetIP returned %v but maskFlag was %v", v, *maskFlag, err)
+ t.Errorf("GetIP returned %v maskFlag was %v error was %v", v, *maskFlag, err)
}
if *durationFlag != 2*time.Minute {
t.Error("duration flag should be 2m, is ", *durationFlag)