diff options
| author | Tamir Duberstein <[email protected]> | 2017-04-12 11:22:49 -0400 |
|---|---|---|
| committer | Eric Paris <[email protected]> | 2017-04-12 11:22:49 -0400 |
| commit | e453343e6260b4a3a89f1f0e10a2fbb07f8d9750 (patch) | |
| tree | 1d2de9d45646d70d32aee7960238ec1c23567952 /flag_test.go | |
| parent | 9a906f17374922ed0f74e1b2f593d3723f2ffb00 (diff) | |
flag_test: fix go vet (#123)
flag_test.go:338: result of fmt.Errorf call not used
flag_test.go:377: no formatting directive in Errorf call
Diffstat (limited to 'flag_test.go')
| -rw-r--r-- | flag_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/flag_test.go b/flag_test.go index 09249c8..172d49f 100644 --- a/flag_test.go +++ b/flag_test.go @@ -335,7 +335,7 @@ func testParse(f *FlagSet, t *testing.T) { func testParseAll(f *FlagSet, t *testing.T) { if f.Parsed() { - fmt.Errorf("f.Parse() = true before Parse") + t.Error("f.Parse() = true before Parse") } f.BoolP("boola", "a", false, "bool value") f.BoolP("boolb", "b", false, "bool2 value") @@ -374,7 +374,7 @@ func testParseAll(f *FlagSet, t *testing.T) { return nil } if err := f.ParseAll(args, store); err != nil { - t.Errorf("expected no error, got ", err) + t.Errorf("expected no error, got %s", err) } if !f.Parsed() { t.Errorf("f.Parse() = false after Parse") |
