attr

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package attr provides shortcuts and helpers to common HTML attributes. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes for a list of attributes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Class

func Class(v string) g.Node

Class returns an attribute with name "class" and the given value.

func Classes

func Classes(cs map[string]bool) g.Node

Classes returns an attribute with name "class" and the value being a sorted, space-separated string of all the keys, for which the corresponding value is true.

func ID

func ID(v string) g.Node

ID returns an attribute with name "id" and the given value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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