mirror of https://github.com/VinGarcia/ksql.git
Fix lint problems
parent
120006008d
commit
a5ee2458ec
|
@ -46,6 +46,7 @@ func (c Client) Find(
|
||||||
return it.Error
|
return it.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetByID recovers a single entity from the database by the ID field.
|
||||||
func (c Client) GetByID(
|
func (c Client) GetByID(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
item interface{},
|
item interface{},
|
||||||
|
|
|
@ -2,10 +2,15 @@ package slices
|
||||||
|
|
||||||
import "reflect"
|
import "reflect"
|
||||||
|
|
||||||
|
// ToInterfaceSlicer describes objects that
|
||||||
|
// can be converted to a list of interfaces
|
||||||
type ToInterfaceSlicer interface {
|
type ToInterfaceSlicer interface {
|
||||||
ToInterfaceSlice() []interface{}
|
ToInterfaceSlice() []interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToInterfaceSlice converts any slice into a slice of empty interfaces.
|
||||||
|
//
|
||||||
|
// If the input argument is not a slice it panics.
|
||||||
func ToInterfaceSlice(slice interface{}) (resp []interface{}) {
|
func ToInterfaceSlice(slice interface{}) (resp []interface{}) {
|
||||||
if iSlicer, ok := slice.(ToInterfaceSlicer); ok {
|
if iSlicer, ok := slice.(ToInterfaceSlicer); ok {
|
||||||
return iSlicer.ToInterfaceSlice()
|
return iSlicer.ToInterfaceSlice()
|
||||||
|
|
Loading…
Reference in New Issue