From 9c29bfccdb1a193721f710b45166aad5345ff75a Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Tue, 20 Aug 2024 13:08:37 +0300 Subject: Reduce code duplication by reusing the correct function in deprecated functions (#194) --- html/attributes.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'html/attributes.go') diff --git a/html/attributes.go b/html/attributes.go index ccd1cb4..6787cf8 100644 --- a/html/attributes.go +++ b/html/attributes.go @@ -130,7 +130,7 @@ func Data(name, v string) g.Node { // // 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 @@ func Style(v string) g.Node { // 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 @@ func Title(v string) g.Node { // Deprecated: Use [Title] instead. func TitleAttr(v string) g.Node { - return g.Attr("title", v) + return Title(v) } func Type(v string) g.Node { -- cgit 1.4.1