tag

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package tag provides the data type for (X)HTML tags/DOM nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tag

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

Tag represents an HTML tag/DOM node.

func NewClosed

func NewClosed(name string, attributes map[string]string, contents string, children ...Tag) Tag

NewClosed returns a new closed tag.

func NewUnclosed

func NewUnclosed(name string, attributes map[string]string) Tag

NewUnclosed returns a new unclosed tag.

func NewWrapper

func NewWrapper(contents string, children ...Tag) Tag

NewWrapper returns a new wrapper tag.

func (Tag) String

func (t Tag) String() (res string)

String returns an indented pretty-printed representation of the Tag.

Jump to

Keyboard shortcuts

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