[go-nuts] Re: first try with templates

2017-02-26 Thread Simon Ritchie
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

[go-nuts] Re: first try with templates

2017-02-26 Thread Simon Ritchie
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

[go-nuts] Re: first try with templates

2017-02-24 Thread 'simon place' via golang-nuts
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