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)
|
|
|
|
}
|
2019-08-31 16:30:17 +00:00
|
|
|
|
|
|
|
type Bool bool
|
|
|
|
|
|
|
|
func (b Bool) String() string {
|
|
|
|
return strconv.FormatBool(bool(b))
|
|
|
|
}
|
2019-08-31 16:46:54 +00:00
|
|
|
|
|
|
|
type String string
|
|
|
|
|
|
|
|
func (s String) String() string {
|
|
|
|
return string(s)
|
|
|
|
}
|