html

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Escape

func Escape(str string) string

Types

type T

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

func Tag

func Tag(name string) T

func Tagf

func Tagf(format string, args ...interface{}) T

func (T) Attr

func (tag T) Attr(key, value string) T

func (T) Class

func (tag T) Class(value string) T

func (T) Href

func (tag T) Href(value string) T

func (T) ID

func (tag T) ID(value string) T

func (T) Inline

func (tag T) Inline() T

func (T) Style

func (tag T) Style(value string) T

type Writer

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

func NewWriter

func NewWriter(f io.Writer, directory string) *Writer

func (*Writer) CacheURL

func (w *Writer) CacheURL(href string) string

func (*Writer) Complete

func (w *Writer) Complete() error

func (*Writer) PopTag

func (w *Writer) PopTag()

func (*Writer) PushTag

func (w *Writer) PushTag(tag T)

func (*Writer) Render

func (w *Writer) Render(fn func(w *Writer) error) string

func (*Writer) RenderTemplate

func (w *Writer) RenderTemplate(name string, model interface{}) string

func (*Writer) Template

func (w *Writer) Template(name string, model interface{})

func (*Writer) WithTag

func (w *Writer) WithTag(tag T, fn func() error)

func (*Writer) Write

func (w *Writer) Write(str string)

func (*Writer) WriteLine

func (w *Writer) WriteLine(str string)

func (*Writer) WriteLineNoIndent

func (w *Writer) WriteLineNoIndent(str string)

func (*Writer) WriteLines

func (w *Writer) WriteLines(strs ...string)

Jump to

Keyboard shortcuts

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