all repos — gomponents @ 9c29bfccdb1a193721f710b45166aad5345ff75a

HTML components in pure Go

Reduce code duplication by reusing the correct function in deprecated functions (#194)

Yarden Shoham
commit

9c29bfccdb1a193721f710b45166aad5345ff75a

parent

935a601975fa7a15c7ddac097e075209e42974cc

2 files changed, 5 insertions(+), 5 deletions(-)

changed files
M html/attributes.gohtml/attributes.go
@@ -130,7 +130,7 @@ // DataAttr attributes automatically have their name prefixed with "data-".
// // Deprecated: Use [Data] instead. func DataAttr(name, v string) g.Node { - return g.Attr("data-"+name, v) + return Data(name, v) } func For(v string) g.Node {
@@ -247,7 +247,7 @@ }
// Deprecated: Use [Style] instead. func StyleAttr(v string) g.Node { - return g.Attr("style", v) + return Style(v) } func TabIndex(v string) g.Node {
@@ -264,7 +264,7 @@ }
// Deprecated: Use [Title] instead. func TitleAttr(v string) g.Node { - return g.Attr("title", v) + return Title(v) } func Type(v string) g.Node {
M html/elements.gohtml/elements.go
@@ -124,7 +124,7 @@ }
// Deprecated: Use [Form] instead. func FormEl(children ...g.Node) g.Node { - return g.El("form", children...) + return Form(children...) } func FieldSet(children ...g.Node) g.Node {
@@ -177,7 +177,7 @@ }
// Deprecated: Use [Label] instead. func LabelEl(children ...g.Node) g.Node { - return g.El("label", children...) + return Label(children...) } func Legend(children ...g.Node) g.Node {