mirror of
https://github.com/danog/liquid.git
synced 2024-11-27 06:44:42 +01:00
16 lines
343 B
Go
16 lines
343 B
Go
|
package liquid
|
||
|
|
||
|
type context struct {
|
||
|
bindings map[string]interface{}
|
||
|
}
|
||
|
|
||
|
// NewContext creates a new context from a variable binding map.
|
||
|
func NewContext(bindings map[string]interface{}) Context {
|
||
|
return &context{bindings}
|
||
|
}
|
||
|
|
||
|
// Bindings is in the Render interface.
|
||
|
func (c *context) Bindings() map[string]interface{} {
|
||
|
return c.bindings
|
||
|
}
|