html

package
v0.0.0-...-de5ff62 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderToString

func RenderToString(nodes []Node) string

Types

type Attribute

type Attribute struct {
	Value string
}

func (Attribute) Write

func (a Attribute) Write(w io.Writer)

type AttributeMap

type AttributeMap map[string]AttributeNode

type AttributeNode

type AttributeNode interface {
	WriterTo
	// contains filtered or unexported methods
}

type Comment

type Comment struct {
	Value string
}

func NewCommentNode

func NewCommentNode(s string) *Comment

func (Comment) Write

func (n Comment) Write(w io.Writer)

type Element

type Element struct {
	TagName    string
	Attributes map[string]AttributeNode
	Children   []Node
}

func NewElementNode

func NewElementNode(tagName string, attributes map[string]AttributeNode, children []Node) *Element

func (Element) Write

func (n Element) Write(w io.Writer)

type EmptyAttribute

type EmptyAttribute struct{}

func (EmptyAttribute) Write

func (EmptyAttribute) Write(w io.Writer)

type Node

type Node interface {
	WriterTo
	// contains filtered or unexported methods
}

type Text

type Text struct {
	Value string
}

func NewTextNode

func NewTextNode(s string) *Text

func (Text) Write

func (n Text) Write(w io.Writer)

type WriterTo

type WriterTo interface {
	Write(w io.Writer)
}

Jump to

Keyboard shortcuts

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