diff --git a/cli/error_test.go b/cli/error_test.go index 6780162c..a7d5adb9 100644 --- a/cli/error_test.go +++ b/cli/error_test.go @@ -17,7 +17,7 @@ func generateString(size int) string { func TestGetLineByOffset(t *testing.T) { numbers := generateString(500) - var testCases = []struct { + testCases := []struct { str string offset int linestr string @@ -172,7 +172,7 @@ func TestGetLineByOffset(t *testing.T) { } func TestGetLineByLine(t *testing.T) { - var testCases = []struct { + testCases := []struct { str string line int linestr string diff --git a/query_test.go b/query_test.go index 5db525e2..475f5c8d 100644 --- a/query_test.go +++ b/query_test.go @@ -194,8 +194,10 @@ func TestQueryRun_Strings(t *testing.T) { if err, ok := v.(error); ok { t.Fatal(err) } - if expected := []interface{}{0x00, int('\\'), 0x1f, int('"'), int('\n'), int('\n'), int('\n'), - int('\n'), int('\n'), int('\n'), int('/'), 0x7f, 0xfffd, 128516}; !reflect.DeepEqual(v, expected) { + if expected := []interface{}{ + 0x00, int('\\'), 0x1f, int('"'), int('\n'), int('\n'), int('\n'), + int('\n'), int('\n'), int('\n'), int('/'), 0x7f, 0xfffd, 128516, + }; !reflect.DeepEqual(v, expected) { t.Errorf("expected: %v, got: %v", expected, v) } }