mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
lib/flagutil: make errcheck happy by explicitly ignoring Array.Set result in tests
This commit is contained in:
parent
c4c447507d
commit
91a49eecea
1 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@ func TestArraySet(t *testing.T) {
|
||||||
f := func(s string, expectedValues []string) {
|
f := func(s string, expectedValues []string) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
var a Array
|
var a Array
|
||||||
a.Set(s)
|
_ = a.Set(s)
|
||||||
if !reflect.DeepEqual([]string(a), expectedValues) {
|
if !reflect.DeepEqual([]string(a), expectedValues) {
|
||||||
t.Fatalf("unexpected values parsed;\ngot\n%q\nwant\n%q", a, expectedValues)
|
t.Fatalf("unexpected values parsed;\ngot\n%q\nwant\n%q", a, expectedValues)
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ func TestArrayGetOptionalArg(t *testing.T) {
|
||||||
f := func(s string, argIdx int, expectedValue string) {
|
f := func(s string, argIdx int, expectedValue string) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
var a Array
|
var a Array
|
||||||
a.Set(s)
|
_ = a.Set(s)
|
||||||
v := a.GetOptionalArg(argIdx)
|
v := a.GetOptionalArg(argIdx)
|
||||||
if v != expectedValue {
|
if v != expectedValue {
|
||||||
t.Fatalf("unexpected value; got %q; want %q", v, expectedValue)
|
t.Fatalf("unexpected value; got %q; want %q", v, expectedValue)
|
||||||
|
@ -77,7 +77,7 @@ func TestArrayString(t *testing.T) {
|
||||||
f := func(s string) {
|
f := func(s string) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
var a Array
|
var a Array
|
||||||
a.Set(s)
|
_ = a.Set(s)
|
||||||
result := a.String()
|
result := a.String()
|
||||||
if result != s {
|
if result != s {
|
||||||
t.Fatalf("unexpected string;\ngot\n%s\nwant\n%s", result, s)
|
t.Fatalf("unexpected string;\ngot\n%s\nwant\n%s", result, s)
|
||||||
|
|
Loading…
Reference in a new issue