Function relocation.

This commit is contained in:
go-jet 2019-07-20 17:44:43 +02:00
parent de34095ece
commit 1ae76d5efd
7 changed files with 15 additions and 10 deletions

View file

@ -7,6 +7,7 @@ import (
"errors"
"fmt"
"github.com/go-jet/jet/execution/internal"
"github.com/go-jet/jet/internal/utils"
"reflect"
"strconv"
"strings"
@ -17,7 +18,7 @@ import (
// Destination can be either pointer to struct or pointer to slice of structs.
func Query(context context.Context, db DB, query string, args []interface{}, destinationPtr interface{}) error {
if destinationPtr == nil {
if utils.IsNil(destinationPtr) {
return errors.New("jet: Destination is nil")
}