1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-30 07:48:58 +01:00
liquid/evaluator/evaluator.go

35 lines
909 B
Go
Raw Permalink Normal View History

2017-08-08 22:42:32 +02:00
// Package evaluator is an interim internal package that forwards to package values.
2017-07-28 00:28:16 +02:00
package evaluator
import (
"reflect"
"time"
2022-01-06 18:43:17 +01:00
"github.com/danog/liquid/values"
2017-07-28 00:28:16 +02:00
)
// Convert should be replaced by values.Convert.
func Convert(value interface{}, typ reflect.Type) (interface{}, error) {
return values.Convert(value, typ)
}
// MustConvertItem should be replaced by values.Convert.
func MustConvertItem(item interface{}, array interface{}) interface{} {
return values.MustConvertItem(item, array)
}
// Sort should be replaced by values.
func Sort(data []interface{}) {
values.Sort(data)
}
// SortByProperty should be replaced by values.SortByProperty
func SortByProperty(data []interface{}, key string, nilFirst bool) {
values.SortByProperty(data, key, nilFirst)
}
// ParseDate should be replaced by values.SortByProperty
func ParseDate(s string) (time.Time, error) {
return values.ParseDate(s)
}