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

16 lines
339 B
Go

package filter
import (
"gitbase.de/apairon/mark2web/context"
"github.com/flosch/pongo2"
)
// RelativePathFilter returns the relative path to navpoint based on current nav
func RelativePathFilter(in, param *pongo2.Value) (*pongo2.Value, *pongo2.Error) {
return pongo2.AsValue(
context.ResolveNavPath(
in.String(),
),
), nil
}