hatmill/attribute/value_types.go
2019-08-31 10:30:17 -06:00

35 lines
525 B
Go

package attribute
import "strings"
import "strconv"
type SpaceList []string
func (l SpaceList) String() string {
return strings.Join(l, " ")
}
type CommaList []string
func (l CommaList) String() string {
return strings.Join(l, ",")
}
type Float float32
func (f Float) String() string {
return strconv.FormatFloat(float64(f), 'G', -1, 32)
}
type Int int
func (n Int) String() string {
return strconv.FormatInt(int64(n), 10)
}
type Bool bool
func (b Bool) String() string {
return strconv.FormatBool(bool(b))
}