Added float attribute type
This commit is contained in:
@ -342,10 +342,10 @@ func Hidden() hatmill.Attrib {
|
||||
}
|
||||
|
||||
// High creates a "high" attribute
|
||||
func High(value string) hatmill.Attrib {
|
||||
func High(value float32) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "high",
|
||||
Value: value,
|
||||
Value: strconv.FormatFloat(float64(value), 'G', -1, 32),
|
||||
}
|
||||
}
|
||||
|
||||
@ -468,10 +468,10 @@ func Loop() hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Low creates a "low" attribute
|
||||
func Low(value string) hatmill.Attrib {
|
||||
func Low(value float32) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "low",
|
||||
Value: value,
|
||||
Value: strconv.FormatFloat(float64(value), 'G', -1, 32),
|
||||
}
|
||||
}
|
||||
|
||||
@ -484,10 +484,10 @@ func Manifest(value string) hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Max creates a "max" attribute
|
||||
func Max(value string) hatmill.Attrib {
|
||||
func Max(value float32) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "max",
|
||||
Value: value,
|
||||
Value: strconv.FormatFloat(float64(value), 'G', -1, 32),
|
||||
}
|
||||
}
|
||||
|
||||
@ -516,10 +516,10 @@ func Method(value string) hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Min creates a "min" attribute
|
||||
func Min(value string) hatmill.Attrib {
|
||||
func Min(value float32) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "min",
|
||||
Value: value,
|
||||
Value: strconv.FormatFloat(float64(value), 'G', -1, 32),
|
||||
}
|
||||
}
|
||||
|
||||
@ -568,10 +568,10 @@ func Open() hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Optimum creates a "optimum" attribute
|
||||
func Optimum(value string) hatmill.Attrib {
|
||||
func Optimum(value float32) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "optimum",
|
||||
Value: value,
|
||||
Value: strconv.FormatFloat(float64(value), 'G', -1, 32),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user