hatmill/attribute/customdata.go

12 lines
269 B
Go
Raw Normal View History

2019-04-03 03:42:16 +00:00
package attribute
import "git.codemonkeysoftware.net/b/hatmill"
2019-04-03 03:42:16 +00:00
// CustomData creates an attribute of the form data-suffix='value'.
func CustomData(suffix, value string) hatmill.Attrib {
return hatmill.Attrib{
Key: "data-" + suffix,
Value: String(value),
2019-04-03 03:42:16 +00:00
}
}