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