mirror of
https://github.com/danog/liquid.git
synced 2024-12-12 21:17:20 +01:00
17 lines
388 B
Go
17 lines
388 B
Go
|
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)
|
||
|
}
|