Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions reflectx/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,7 @@ type typeQueue struct {
// A copying append that creates a new slice each time.
func apnd(is []int, i int) []int {
x := make([]int, len(is)+1)
for p, n := range is {
x[p] = n
}
copy(x, is)
x[len(x)-1] = i
return x
}
Expand Down
5 changes: 1 addition & 4 deletions reflectx/reflect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,6 @@ func TestMapperMethodsByName(t *testing.T) {
A0 *B `db:"A0"`
B `db:"A1"`
A2 int
a3 int
}

val := &A{
Expand Down Expand Up @@ -811,8 +810,6 @@ func TestMustBe(t *testing.T) {
t.Error("expected panic with *reflect.ValueError")
return
}
if valueErr.Method != "github.com/jmoiron/sqlx/reflectx.TestMustBe" {
}
if valueErr.Kind != reflect.String {
t.Errorf("unexpected Kind: %s", valueErr.Kind)
}
Expand Down Expand Up @@ -971,4 +968,4 @@ func BenchmarkTraversalsByNameFunc(b *testing.B) {
b.Errorf("expected %d values, got %d", len(names), l)
}
}
}
}