Documentation ¶
Overview ¶
Package template provides a mockable wrapper for html/template.
Index ¶
- type Impl
- func (*Impl) HTMLEscape(w io.Writer, b []byte)
- func (*Impl) HTMLEscapeString(s string) string
- func (*Impl) HTMLEscaper(args ...any) string
- func (*Impl) IsTrue(val any) (truth bool, ok bool)
- func (*Impl) JSEscape(w io.Writer, b []byte)
- func (*Impl) JSEscapeString(s string) string
- func (*Impl) JSEscaper(args ...any) string
- func (*Impl) Must(t *template.Template, err error) *template.Template
- func (*Impl) New(name string) *template.Template
- func (*Impl) ParseFS(fs fs.FS, patterns ...string) (*template.Template, error)
- func (*Impl) ParseFiles(filenames ...string) (*template.Template, error)
- func (*Impl) ParseGlob(pattern string) (*template.Template, error)
- func (*Impl) URLQueryEscaper(args ...any) string
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Impl ¶
type Impl struct{}
func (*Impl) HTMLEscapeString ¶
func (*Impl) HTMLEscaper ¶
func (*Impl) JSEscapeString ¶
func (*Impl) URLQueryEscaper ¶
type Interface ¶
type Interface interface { HTMLEscape(w io.Writer, b []byte) HTMLEscapeString(s string) string HTMLEscaper(args ...any) string IsTrue(val any) (truth bool, ok bool) JSEscape(w io.Writer, b []byte) JSEscapeString(s string) string JSEscaper(args ...any) string Must(t *template.Template, err error) *template.Template New(name string) *template.Template ParseFS(fs fs.FS, patterns ...string) (*template.Template, error) ParseFiles(filenames ...string) (*template.Template, error) ParseGlob(pattern string) (*template.Template, error) URLQueryEscaper(args ...any) string }
Click to show internal directories.
Click to hide internal directories.