1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-11-25 22:01:39 +02:00

add NewPairValueType

This commit is contained in:
3timeslazy
2019-10-21 20:11:47 +03:00
parent ebe9748dd5
commit ae94075a42
6 changed files with 46 additions and 23 deletions

View File

@@ -21,9 +21,9 @@ func DateDiff(_ context.Context, args ...core.Value) (core.Value, error) {
}
err = core.ValidateValueTypePairs(
core.PairValueType{Value: args[0], Types: sliceDateTime},
core.PairValueType{Value: args[1], Types: sliceDateTime},
core.PairValueType{Value: args[2], Types: sliceStringType},
core.NewPairValueType(args[0], types.DateTime),
core.NewPairValueType(args[1], types.DateTime),
core.NewPairValueType(args[2], types.String),
)
if err != nil {
return values.None, err