testing better types
This commit is contained in:
4
lazy.go
4
lazy.go
@@ -42,7 +42,7 @@ type Config struct {
|
||||
type StructMock struct {
|
||||
Query string
|
||||
Args []driver.Value
|
||||
MockStructs []any
|
||||
MockStructs any
|
||||
Result driver.Result
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ func RandomStruct(c Config) (*StructMock, error) {
|
||||
return &StructMock{
|
||||
Query: sqlx.Rebind(sqlx.AT, regexp.QuoteMeta(c.Query)),
|
||||
Args: args,
|
||||
MockStructs: reflect.ValueOf(filled).Interface().([]any),
|
||||
MockStructs: reflect.ValueOf(filled).Interface(),
|
||||
Result: &sqlResult{
|
||||
rowsAffected: int64(c.RowCount),
|
||||
err: nil,
|
||||
|
Reference in New Issue
Block a user