Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
jedib0t committed Nov 27, 2024
1 parent 51f98fa commit 2a23c39
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
9 changes: 0 additions & 9 deletions table/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,6 @@ func objAsSlice(in interface{}) []interface{} {
}

out = append(out, v2.Interface())
//if v2.Kind() == reflect.Pointer {
// if !v2.IsNil() {
// out = append(out, reflect.ValueOf(v2.Elem().Interface()))
// } else {
// out = append(out, nil)
// }
//} else {
// out = append(out, v2.Elem().Interface())
//}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions table/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func Test_objAsSlice(t *testing.T) {
assert.Equal(t, "[1 2 3]", fmt.Sprint(objAsSlice(&[]int{a, b, c})))
assert.Equal(t, "[1 2 3]", fmt.Sprint(objAsSlice(&[]*int{&a, &b, &c})))
assert.Equal(t, "[1 2]", fmt.Sprint(objAsSlice(&[]*int{&a, &b, nil})))
assert.Equal(t, "[<nil> 2]", fmt.Sprint(objAsSlice(&[]*int{nil, &b, nil})))
}

func Test_objIsSlice(t *testing.T) {
Expand Down

0 comments on commit 2a23c39

Please sign in to comment.