Reduce code duplication by reusing the correct function in deprecated functions (#194)
1 file changed, 3 insertions(+), 3 deletions(-)
changed files
M html/attributes.go → html/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 {