thanks, but....

the handed-in data, on each execute, doesn't seem like a good fit for a 
global var, and there will always be the actual one-off 'context' data i 
will need to push in, so its not available.

so if you really can't do this....

option1:  i could use a function, but that seemed like overkill.

option2: i could keep rebuilding the template with the var directly 
inserted into the template definition, but that kind of defeats the point 
of templates, i may as well do the whole thing that way.

option3: i could embed the context data in a struct with the global stuff 
as pointer members.


On Saturday, 25 February 2017 00:34:38 UTC, Ian Davis wrote:
>
>
> On Fri, 24 Feb 2017, at 11:40 PM, 'simon place' via golang-nuts wrote:
>
> https://play.golang.org/p/NGU4kstcT-
>
> just trying to put one var into one template and i'm failing!, see above, 
> i've tried the docs, googling and randomly guessing. please someone put me 
> out of my misery.
>
>
> Hopefully this variation will help you get started:
>
> https://play.golang.org/p/npB-83GnXV
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to