"fmt"
"reflect"
"strconv"
+ "time"
)
// ValueConverter is the interface providing the ConvertValue method.
// 1 is true
// 0 is false,
// other integers are an error
-// - for strings and []byte, same rules as strconv.Atob
+// - for strings and []byte, same rules as strconv.ParseBool
// - all other types are an error
var Bool boolType
// bool
// nil
// []byte
+// time.Time
// string
//
-// This is the ame list as IsScanSubsetType, with the addition of
+// This is the same list as IsScanSubsetType, with the addition of
// string.
func IsParameterSubsetType(v interface{}) bool {
if IsScanSubsetType(v) {
// bool
// nil
// []byte
+// time.Time
//
// This is the same list as IsParameterSubsetType, without string.
func IsScanSubsetType(v interface{}) bool {
return true
}
switch v.(type) {
- case int64, float64, []byte, bool:
+ case int64, float64, []byte, bool, time.Time:
return true
}
return false