You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
459 B
Go

5 years ago
package blammo
type Tags struct {
key string
value interface{}
parent *Tags
}
5 years ago
func (t *Tags) Tag(key string) *Tags {
return &Tags{key: key, parent: t}
}
func (t *Tags) TagInt(key string, v int) *Tags {
return &Tags{key: key, value: v, parent: t}
}
func (t *Tags) TagString(key, v string) *Tags {
return &Tags{key: key, value: v, parent: t}
}
func (t *Tags) TagFloat(key string, v float64) *Tags {
return &Tags{key: key, value: v, parent: t}
}