Standard library / html/template
html/template.Error.Error()
Formats contextual escaping diagnostics. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (e *Error) Error() stringReturn Value
string
Formats contextual escaping diagnostics.
Working Example
Example Snippetgo
package main
import ( "fmt" "html/template" "strings")
func main() { e := &template.Error{Description: "demo failure"} fmt.Println(strings.Contains(e.Error(), "demo failure"))}