Added int attribute type
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
package attribute
|
||||
|
||||
import "gitlab.codemonkeysoftware.net/b/hatmill"
|
||||
import "strconv"
|
||||
|
||||
// Accept creates a "accept" attribute
|
||||
func Accept(value string) hatmill.Attrib {
|
||||
@ -146,18 +147,18 @@ func Class(value string) hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Cols creates a "cols" attribute
|
||||
func Cols(value string) hatmill.Attrib {
|
||||
func Cols(value int) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "cols",
|
||||
Value: value,
|
||||
Value: strconv.FormatInt(int64(value), 10),
|
||||
}
|
||||
}
|
||||
|
||||
// Colspan creates a "colspan" attribute
|
||||
func Colspan(value string) hatmill.Attrib {
|
||||
func Colspan(value int) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "colspan",
|
||||
Value: value,
|
||||
Value: strconv.FormatInt(int64(value), 10),
|
||||
}
|
||||
}
|
||||
|
||||
@ -326,10 +327,10 @@ func Headers(value string) hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Height creates a "height" attribute
|
||||
func Height(value string) hatmill.Attrib {
|
||||
func Height(value int) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "height",
|
||||
Value: value,
|
||||
Value: strconv.FormatInt(int64(value), 10),
|
||||
}
|
||||
}
|
||||
|
||||
@ -490,11 +491,11 @@ func Max(value string) hatmill.Attrib {
|
||||
}
|
||||
}
|
||||
|
||||
// Maxlengh creates a "maxlengh" attribute
|
||||
func Maxlengh(value string) hatmill.Attrib {
|
||||
// Maxlength creates a "maxlength" attribute
|
||||
func Maxlength(value int) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "maxlengh",
|
||||
Value: value,
|
||||
Key: "maxlength",
|
||||
Value: strconv.FormatInt(int64(value), 10),
|
||||
}
|
||||
}
|
||||
|
||||
@ -523,10 +524,10 @@ func Min(value string) hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Minlength creates a "minlength" attribute
|
||||
func Minlength(value string) hatmill.Attrib {
|
||||
func Minlength(value int) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "minlength",
|
||||
Value: value,
|
||||
Value: strconv.FormatInt(int64(value), 10),
|
||||
}
|
||||
}
|
||||
|
||||
@ -652,18 +653,18 @@ func Reversed() hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Rows creates a "rows" attribute
|
||||
func Rows(value string) hatmill.Attrib {
|
||||
func Rows(value int) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "rows",
|
||||
Value: value,
|
||||
Value: strconv.FormatInt(int64(value), 10),
|
||||
}
|
||||
}
|
||||
|
||||
// Rowspan creates a "rowspan" attribute
|
||||
func Rowspan(value string) hatmill.Attrib {
|
||||
func Rowspan(value int) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "rowspan",
|
||||
Value: value,
|
||||
Value: strconv.FormatInt(int64(value), 10),
|
||||
}
|
||||
}
|
||||
|
||||
@ -699,10 +700,10 @@ func Shape(value string) hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Size creates a "size" attribute
|
||||
func Size(value string) hatmill.Attrib {
|
||||
func Size(value int) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "size",
|
||||
Value: value,
|
||||
Value: strconv.FormatInt(int64(value), 10),
|
||||
}
|
||||
}
|
||||
|
||||
@ -803,10 +804,10 @@ func Summary(value string) hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Tabindex creates a "tabindex" attribute
|
||||
func Tabindex(value string) hatmill.Attrib {
|
||||
func Tabindex(value int) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "tabindex",
|
||||
Value: value,
|
||||
Value: strconv.FormatInt(int64(value), 10),
|
||||
}
|
||||
}
|
||||
|
||||
@ -859,10 +860,10 @@ func Value(value string) hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Width creates a "width" attribute
|
||||
func Width(value string) hatmill.Attrib {
|
||||
func Width(value int) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "width",
|
||||
Value: value,
|
||||
Value: strconv.FormatInt(int64(value), 10),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user