conditions
conditions copied to clipboard
Time and Duration Support
I'm about to use this library as rules engine.
I have found there is a code related time.Time
and time.Duration
(it's int64 anyway) but it is not used.
// InspectDataType returns the data type of a given value.
func InspectDataType(v interface{}) DataType {
switch v.(type) {
case float64:
return Number
case bool:
return Boolean
case string:
return String
case time.Time:
return Time
case time.Duration:
return Duration
default:
return Unknown
}
}
Is there any plan to support time related types?
If you have any spec for that, it would be really great share me. I want to use time types and I have plans to implement it.