Sorry, that last response could have been a bit more helpful.
My templates take a structure as input. When I execute the template, I
pass the structure to the template.
This line in the template:
{{$resourceNameLower := .NameWithLowerFirst}}
takes the contents of the NameWithLowerFirst
The documentation for Go templates is ... scanty.
My scaffolder https://github.com/goblimey/scaffolder includes several
templates that set variables. It does other useful stuff such as driving
template production from a JSON spec, creating templates from other
templates, and so on.
Regards
S
well option3 seems to work
https://play.golang.org/p/XMih6ocmGY
--
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 mor