mark2web/filter/relative_path.go
Sebastian Frank 29f01a2618
All checks were successful
continuous-integration/drone/push Build is passing
reorganized code
2019-03-18 15:14:41 +01:00

16 lines
332 B
Go

package filter
import (
"gitbase.de/apairon/mark2web"
"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(
mark2web.ResolveNavPath(
in.String(),
),
), nil
}