mark2web/filter/dump.go
Sebastian Frank b2e0d78a2c
Some checks failed
continuous-integration/drone/push Build is failing
reorganized code
2019-03-18 13:34:52 +01:00

13 lines
344 B
Go

package filter
import (
"github.com/davecgh/go-spew/spew"
"github.com/flosch/pongo2"
)
// DumpFilter is a pongo2 filter, which returns a spew.Dump of the input
func DumpFilter(in *pongo2.Value, param *pongo2.Value) (*pongo2.Value, *pongo2.Error) {
dumpString := spew.Sdump(in.Interface())
return pongo2.AsValue(string(dumpString)), nil
}