all repos — gomponents @ b950ec2c42bd613fa23625ab6360f58b9ba28e07

HTML components in pure Go

Add LabelAttr and List attributes (#175) Fixes #168 and fixes #169.

Markus Wüstenberg
commit

b950ec2c42bd613fa23625ab6360f58b9ba28e07

parent

81b2d6a9e39ff8859400bfa806cb3e712049615c

2 files changed, 10 insertions(+), 0 deletions(-)

changed files
M html/attributes.gohtml/attributes.go
@@ -145,8 +145,16 @@ func Integrity(v string) g.Node {
return g.Attr("integrity", v) } +func LabelAttr(v string) g.Node { + return g.Attr("label", v) +} + func Lang(v string) g.Node { return g.Attr("lang", v) +} + +func List(v string) g.Node { + return g.Attr("list", v) } func Loading(v string) g.Node {
M html/attributes_test.gohtml/attributes_test.go
@@ -61,7 +61,9 @@ {Name: "height", Func: Height},
{Name: "href", Func: Href}, {Name: "id", Func: ID}, {Name: "integrity", Func: Integrity}, + {Name: "label", Func: LabelAttr}, {Name: "lang", Func: Lang}, + {Name: "list", Func: List}, {Name: "loading", Func: Loading}, {Name: "max", Func: Max}, {Name: "maxlength", Func: MaxLength},