1
0
mirror of https://github.com/danog/liquid.git synced 2024-12-12 21:17:20 +01:00
liquid/expressions/config.go

17 lines
388 B
Go
Raw Normal View History

2017-07-04 17:08:57 +02:00
package expressions
// 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)
}