mirror of https://github.com/VinGarcia/ksql.git
Improve comment on FillSliceWith() helper func
parent
ad77d0a1a0
commit
76e5ad0f0f
|
@ -311,8 +311,8 @@ func FillStructWith(entity interface{}, dbRow map[string]interface{}) error {
|
||||||
// FillSliceWith is meant to be used on unit tests to mock
|
// FillSliceWith is meant to be used on unit tests to mock
|
||||||
// the response from the database.
|
// the response from the database.
|
||||||
//
|
//
|
||||||
// The first argument is any struct you are passing to a kissorm func,
|
// The first argument is any slice of structs you are passing to a kissorm func,
|
||||||
// and the second is a map representing a database row you want
|
// and the second is a slice of maps representing the database rows you want
|
||||||
// to use to update this struct.
|
// to use to update this struct.
|
||||||
func FillSliceWith(entities interface{}, dbRows []map[string]interface{}) error {
|
func FillSliceWith(entities interface{}, dbRows []map[string]interface{}) error {
|
||||||
slicePtrValue := reflect.ValueOf(entities)
|
slicePtrValue := reflect.ValueOf(entities)
|
||||||
|
|
Loading…
Reference in New Issue