spec

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelCase

func CamelCase(name string) string

CamelCase converts dash or underscore separated text to CamelCase.

Types

type Attribute

type Attribute struct {
	Field string
	Type  string
	Attr  string
}

Attribute represents an HTML attribute with its metadata.

type Loader

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

Loader fetches HTML element specs from the local tags dataset.

func NewLoader

func NewLoader() *Loader

NewLoader creates a loader backed by the tags dataset.

func (*Loader) CollectAllAttributes

func (l *Loader) CollectAllAttributes(specs []TagSpec) map[string]Attribute

CollectAllAttributes aggregates attributes from tag specs (excluding globals).

func (*Loader) LoadAllTagSpecs

func (l *Loader) LoadAllTagSpecs() ([]TagSpec, error)

LoadAllTagSpecs parses all tag definitions except the wildcard entry.

func (*Loader) LoadGlobalAttributes

func (l *Loader) LoadGlobalAttributes() ([]Attribute, error)

LoadGlobalAttributes returns the wildcard attributes as global attributes.

type TagSpec

type TagSpec struct {
	Name          string
	Void          bool
	Attributes    []Attribute
	ParentTargets []string
}

TagSpec contains the information needed to generate a tag file.

Jump to

Keyboard shortcuts

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