You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope the suffix will be defautl as ".tmpl", so I can use like c.Html(200,"index",nil) ,this will find index.tmpl, if c.Html(200,"index.html".nil) will find the index.html.
ps: i'm not a english user, so my English is very bad, please forgive me
The text was updated successfully, but these errors were encountered:
There are another libraries that adds a configured suffix, in my opinion it adds unneeded complexity.
An UX designed told me one day: "explicit is usually better than implicit".
I think the Go philosophy is similar, I prefer the developers to use "index.tmpl" or "index.html" or whatever the file name is, instead of adding tons of configuration variables (I can't hardcode ".tmpl") and make c.HTML(200, "index", nil) works like magic.
If you want to serve static files please use gin.Static() or use c.Writer/c.Data directly.
r := gin.Default()
r.Static("/static", "/var/www") // var/www is the root path in your local disk/volume
I hope the suffix will be defautl as ".tmpl", so I can use like c.Html(200,"index",nil) ,this will find index.tmpl, if c.Html(200,"index.html".nil) will find the index.html.
ps: i'm not a english user, so my English is very bad, please forgive me
The text was updated successfully, but these errors were encountered: