Skip to content

Commit

Permalink
MINOR: [Go] fill in field names of struct literal (#13723)
Browse files Browse the repository at this point in the history
I just wanted the annoying "Problems" number to go away by fixing this little lint situation that was annoying me by saying that the struct literal was using un-keyed fields.

This is an extremely minor simple change.

Authored-by: Matt Topol <zotthewizard@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
  • Loading branch information
zeroshade committed Jul 27, 2022
1 parent bc6c498 commit 71ccff9
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions go/arrow/array/interval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ func TestDayTimeArray(t *testing.T) {
defer mem.AssertSize(t, 0)

var (
want = []arrow.DayTimeInterval{{1, 1}, {2, 2}, {3, 3}, {4, 4}}
want = []arrow.DayTimeInterval{
{Days: 1, Milliseconds: 1}, {Days: 2, Milliseconds: 2},
{Days: 3, Milliseconds: 3}, {Days: 4, Milliseconds: 4}}
valids = []bool{true, true, false, true}
)

Expand Down Expand Up @@ -240,7 +242,9 @@ func TestDayTimeIntervalBuilder_Empty(t *testing.T) {
mem := memory.NewCheckedAllocator(memory.NewGoAllocator())
defer mem.AssertSize(t, 0)

want := []arrow.DayTimeInterval{{1, 1}, {2, 2}, {3, 3}, {4, 4}}
want := []arrow.DayTimeInterval{
{Days: 1, Milliseconds: 1}, {Days: 2, Milliseconds: 2},
{Days: 3, Milliseconds: 3}, {Days: 4, Milliseconds: 4}}

b := array.NewDayTimeIntervalBuilder(mem)
defer b.Release()
Expand Down Expand Up @@ -282,9 +286,11 @@ func TestMonthDayNanoArray(t *testing.T) {

var (
want = []arrow.MonthDayNanoInterval{
{1, 1, 1000}, {2, 2, 2000}, {3, 3, 3000}, {4, 4, 4000},
{0, 0, 0}, {-1, -2, -300}, {math.MaxInt32, math.MinInt32, math.MaxInt64},
{math.MinInt32, math.MaxInt32, math.MinInt64},
{Months: 1, Days: 1, Nanoseconds: 1000}, {Months: 2, Days: 2, Nanoseconds: 2000},
{Months: 3, Days: 3, Nanoseconds: 3000}, {Months: 4, Days: 4, Nanoseconds: 4000},
{Months: 0, Days: 0, Nanoseconds: 0}, {Months: -1, Days: -2, Nanoseconds: -300},
{Months: math.MaxInt32, Days: math.MinInt32, Nanoseconds: math.MaxInt64},
{Months: math.MinInt32, Days: math.MaxInt32, Nanoseconds: math.MinInt64},
}
valids = []bool{true, true, false, true, true, true, false, true}
)
Expand Down Expand Up @@ -370,7 +376,11 @@ func TestMonthDayNanoIntervalBuilder_Empty(t *testing.T) {
mem := memory.NewCheckedAllocator(memory.NewGoAllocator())
defer mem.AssertSize(t, 0)

want := []arrow.MonthDayNanoInterval{{1, 1, 1000}, {2, 2, 2000}, {3, 3, 3000}, {4, 4, 4000}}
want := []arrow.MonthDayNanoInterval{
{Months: 1, Days: 1, Nanoseconds: 1000},
{Months: 2, Days: 2, Nanoseconds: 2000},
{Months: 3, Days: 3, Nanoseconds: 3000},
{Months: 4, Days: 4, Nanoseconds: 4000}}

b := array.NewMonthDayNanoIntervalBuilder(mem)
defer b.Release()
Expand Down

0 comments on commit 71ccff9

Please sign in to comment.