Saturday, 15 May 2010

go - In a template how do you access an outer scope while inside of a "with" or "range" scope? -



go - In a template how do you access an outer scope while inside of a "with" or "range" scope? -

when within with or range, scope of . changed. how access calling scope?

{{with .inner}} outer: {{$.outervalue}} inner: {{.innervalue}} {{end}}

go go-templates

No comments:

Post a Comment