Help us shape the future of Go! Take the 2026 Go Developer Survey

htmlutil

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeString added in v1.3.0

func EscapeString(s string) template.HTML

func HTMLFormat

func HTMLFormat(s template.HTML, rawArgs ...any) template.HTML

func HTMLPrint

func HTMLPrint(w io.Writer, s template.HTML) (int, error)

func HTMLPrintTag

func HTMLPrintTag(w io.Writer, tag template.HTML, attrs map[string]string) (written int, err error)

func HTMLPrintf

func HTMLPrintf(w io.Writer, s template.HTML, rawArgs ...any) (int, error)

func ParseSizeAndClass

func ParseSizeAndClass(defaultSize int, defaultClass string, others ...any) (int, string)

ParseSizeAndClass get size and class from string with default values If present, "others" expects the new size first and then the classes to use

Types

type HTMLBuilder added in v1.3.0

type HTMLBuilder struct {
	// contains filtered or unexported fields
}

func (*HTMLBuilder) HTMLString added in v1.3.0

func (b *HTMLBuilder) HTMLString() template.HTML

func (*HTMLBuilder) String added in v1.3.0

func (b *HTMLBuilder) String() string

func (*HTMLBuilder) WriteFormat added in v1.3.0

func (b *HTMLBuilder) WriteFormat(fmt template.HTML, args ...any) *HTMLBuilder

func (*HTMLBuilder) WriteHTML added in v1.3.0

func (b *HTMLBuilder) WriteHTML(s template.HTML) *HTMLBuilder

func (*HTMLBuilder) WriteString added in v1.3.0

func (b *HTMLBuilder) WriteString(s string) *HTMLBuilder

type HTMLWriter added in v1.3.0

type HTMLWriter interface {
	OriginWriter() io.Writer
	WriteString(s string) HTMLWriter
	WriteHTML(s template.HTML) HTMLWriter
	WriteFormat(fmt template.HTML, args ...any) HTMLWriter
	Err() error
}

func NewHTMLWriter added in v1.3.0

func NewHTMLWriter(w io.Writer) HTMLWriter

Jump to

Keyboard shortcuts

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