Hi Josh
You can add a custom func to iterate over an int : Playground 
<https://play.golang.org/p/FAp_lHY88B>

This is similar to the sprig "until" func 
<https://godoc.org/github.com/Masterminds/sprig>.

On Tuesday, December 12, 2017 at 5:43:06 AM UTC+1, Josh Cox wrote:
>
> Why is there not a 'for' action in go templating 
> <https://golang.org/pkg/text/template/>?
>
> I seem to get punted for asking such blasphemy!
>
> my stackoverflow question 
> <https://stackoverflow.com/questions/47762628/for-loop-in-go-templating>
>
> and my [github issue](
> https://github.com/golang/go/issues/23088#issuecomment-350871434)
>
> But it's a serious question, the range action does not seem to fit what I 
> want here ( which is a simple loop over a count ).
>

-- 
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