template

package
v0.0.0-...-fab57c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package template provides a mockable wrapper for text/template.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) HTMLEscape

func (*Impl) HTMLEscape(w io.Writer, b []byte)

func (*Impl) HTMLEscapeString

func (*Impl) HTMLEscapeString(s string) string

func (*Impl) HTMLEscaper

func (*Impl) HTMLEscaper(args ...any) string

func (*Impl) IsTrue

func (*Impl) IsTrue(val any) (truth bool, ok bool)

func (*Impl) JSEscape

func (*Impl) JSEscape(w io.Writer, b []byte)

func (*Impl) JSEscapeString

func (*Impl) JSEscapeString(s string) string

func (*Impl) JSEscaper

func (*Impl) JSEscaper(args ...any) string

func (*Impl) Must

func (*Impl) Must(t *template.Template, err error) *template.Template

func (*Impl) New

func (*Impl) New(name string) *template.Template

func (*Impl) ParseFS

func (*Impl) ParseFS(fsys fs.FS, patterns ...string) (*template.Template, error)

func (*Impl) ParseFiles

func (*Impl) ParseFiles(filenames ...string) (*template.Template, error)

func (*Impl) ParseGlob

func (*Impl) ParseGlob(pattern string) (*template.Template, error)

func (*Impl) URLQueryEscaper

func (*Impl) URLQueryEscaper(args ...any) string

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(fsys fs.FS, patterns ...string) (*template.Template, error)
	ParseFiles(filenames ...string) (*template.Template, error)
	ParseGlob(pattern string) (*template.Template, error)
	URLQueryEscaper(args ...any) string
}

Directories

Path Synopsis
Package parse provides a mockable wrapper for text/template/parse.
Package parse provides a mockable wrapper for text/template/parse.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL