We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if i use html/template Delim ,i can't use html.rander in debug mode.
this caused me to restart the server everytime when i changed the template
The text was updated successfully, but these errors were encountered:
I do something like this
// A custom function func TemplateMe(c *gin.Context, page string, data interface{}) { tmpl, err := template.New("").Delims("[[", "]]").ParseFiles("views/view_layout.html", "views/"+page) if err != nil { http.Error(c.Writer, err.Error(), http.StatusInternalServerError) } tmpl.ExecuteTemplate(c.Writer, "layout", data) } // A handler func indexHandler(c *gin.Context) { data := gin.H{"Title": "Hello World!"} TemplateMe(c, "view_login.html", data) }
Sorry, something went wrong.
I creat a PR for solve this. The PR is #860
Should you guys close this since the PR got merged?
@afiune yes, see the following document.
https://github.com/gin-gonic/gin#custom-delimiters
No branches or pull requests
if i use html/template Delim ,i can't use html.rander in debug mode.
this caused me to restart the server everytime when i changed the template
The text was updated successfully, but these errors were encountered: