Golang html/template.Template.Delims function examples
package html/template
Delims sets the action delimiters to the specified strings, to be used in subsequent calls to Parse, ParseFiles, or ParseGlob. Nested template definitions will inherit the settings. An empty delimiter stands for the corresponding default: {{ or }}. The return value is the template, so calls can be chained.
Golang html/template.Template.Delims function usage examples
Example 1:
rev := template.New("")
rev.Delims("<#", "#>")
Example 2:
t := template.Must(template.New("template").Delims("*(", ")*").Parse(srcString))
Reference :
Advertisement
Something interesting
Tutorials
+33.8k Golang : convert(cast) bytes to string
+9.3k Golang : Generate EAN barcode
+11.3k Golang : Byte format example
+14k Golang : convert rune to unicode hexadecimal value and back to rune character
+9.5k Mac OSX : Get a process/daemon status information
+25.3k Golang : Convert uint value to string type
+8k Golang : Get all countries phone codes
+15.2k Golang : How to add color to string?
+10.2k Golang : How to profile or log time spend on execution?
+5k Golang : micron to centimeter example
+10.3k Golang : Wait and sync.WaitGroup example
+15.6k Chrome : ERR_INSECURE_RESPONSE and allow Chrome browser to load insecure content