Re: [go-nuts] template

2020-07-23 Thread Tharaneedharan Vilwanathan
Hi Lutz, Sorry I was not clear earlier. Yes, this is regarding Go HTML template. We use beego and HTML templates under that. We generally use nested templates in which we have nested if conditions as needed and for loop (range). We also do some minor computation, etc. I feel over time, the temp

Re: [go-nuts] template

2020-07-22 Thread Lutz Horn
I am running a website for which we use templates. Do you use https://golang.org/pkg/html/template/? If yes, how do you use them? If no, this question is off-topic for this mailing list. Lutz -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. T

Re: [go-nuts] template Funcs with ParseFile and Execute

2017-03-25 Thread Rob Pike
Please check the error on the line that calls template.New. I believe it's reporting failure. -rob On Sat, Mar 25, 2017 at 9:56 AM, priyank pulumati < pulumati.priy...@gmail.com> wrote: > Sry for little info, template.Base is a constant ("templates/base.html", a > path) and the same for templat

Re: [go-nuts] template Funcs with ParseFile and Execute

2017-03-25 Thread priyank pulumati
Sry for little info, template.Base is a constant ("templates/base.html", a path) and the same for templateName passed from my controller. But what do i pass in template.New() ? On Saturday, March 25, 2017 at 10:17:23 PM UTC+5:30, Yves Junqueira wrote: > > Your ParseFiles call has a "templateName"

Re: [go-nuts] template Funcs with ParseFile and Execute

2017-03-25 Thread priyank pulumati
Sry for little information, templateName is passed from my controllers with a constant (like "templates/home.html"), so there is no problem with that. In template.new(), what do i pass ? On Saturday, March 25, 2017 at 10:17:23 PM UTC+5:30, Yves Junqueira wrote: > > Your ParseFiles call has a "tem

Re: [go-nuts] template Funcs with ParseFile and Execute

2017-03-25 Thread Yves Junqueira
Your ParseFiles call has a "templateName" argument in it. The ParseFiles function only takes file paths, not template names. And templates.New takes a template name, not a file path. Hope this helps. On Sat, Mar 25, 2017 at 9:14 AM, priyank pulumati < pulumati.priy...@gmail.com> wrote: > hello,

RE: [go-nuts] template Inheritance

2016-11-18 Thread dhal.asitk
Hi, You won’t find everything in Jinja exactly in Golang. If you want to do in Golang, you can refer here. https://hackernoon.com/golang-template-2-template-composition-and-how-to-organize-template-files-4cb40bcdf8f6#.3ljf0fsjy You can refer here also. https://github.com/jmoiron/jigo These guys