1
0
mirror of https://github.com/danog/liquid.git synced 2024-12-13 02:37:18 +01:00
liquid/expression/config.go

17 lines
387 B
Go
Raw Normal View History

2017-07-04 17:12:40 +02:00
package expression
2017-07-04 17:08:57 +02:00
// Config holds configuration information for expression interpretation.
type Config struct {
filters *filterDictionary
}
// NewConfig creates a new Settings.
func NewConfig() Config {
return Config{newFilterDictionary()}
}
// AddFilter adds a filter function to settings.
func (s Config) AddFilter(name string, fn interface{}) {
s.filters.addFilter(name, fn)
}