Suppose you have the following code
router.Get("foo").URL("id", id)
If I want to do something similar in a go template. I believe I have to go the long way and create an intermediary variable.
{{ $urlGenerator := .Router.Get "foo" }}
{{ $urlGenerator.URL "id" .Id }}
Preferably it would look like something like this
{{ (.Router.Get "foo") .Url }}
Or simply
{{ .Router.Get("foo").Url }}
Has anyone found a way that works a little like this? I can not find anything in the documentation regarding this, other than pipes, which works as... pipes.