hatmill/attribute/value_types.go

29 lines
438 B
Go
Raw Normal View History

2019-08-31 15:47:37 +00:00
package attribute
import "strings"
2019-08-31 15:56:56 +00:00
import "strconv"
2019-08-31 15:47:37 +00:00
type SpaceList []string
func (l SpaceList) String() string {
return strings.Join(l, " ")
}
2019-08-31 15:51:43 +00:00
type CommaList []string
func (l CommaList) String() string {
return strings.Join(l, ",")
}
2019-08-31 15:56:56 +00:00
type Float float32
func (f Float) String() string {
return strconv.FormatFloat(float64(f), 'G', -1, 32)
}
2019-08-31 16:20:58 +00:00
type Int int
func (n Int) String() string {
return strconv.FormatInt(int64(n), 10)
}