Documentation ¶
Index ¶
- Variables
- func If[T ~string | Result](cond bool, result T) T
- func IfCall[T ~string | Result](cond bool, call func() T) T
- func IfElse[T ~string | Result](cond bool, ifR T, elseR T) T
- func IfElseCall[T ~string | Result](cond bool, ifCall func() T, elseCall func() T) T
- type Attr
- type Result
- func Append(collect Result, frags ...Result) Result
- func AsIs(a ...string) Result
- func JSStringEscape(a string) Result
- func Map[T any](a []T, f func(int) Result) Result
- func NewElem(tag string, attr Attr, bodyEl ...Result) Result
- func NewHTML(cap int) Result
- func Prepend(doctype string, html Result) Result
- func See(what ...any) Result
- func Text(a string) Result
Constants ¶
This section is empty.
Variables ¶
View Source
var EncodeURIComponent = url.QueryEscape
Functions ¶
func IfElseCall ¶
Types ¶
type Attr ¶
type Attr string
func NewAttr ¶
NewAttr constructs an attribute portion of an element(tag) attr: can be a complete attribute(s) specified as-is, or an attribute name, in which case it must end with =, and be followed by attribute value in the next arg, e.g. attr("disabled", `rel="icon" id=""`, "href=", "/", "class=", "") => disabled rel="icon" id="" href="/" class=""
Click to show internal directories.
Click to hide internal directories.