package atr import "strings" type Atr string const sep Atr = "," // New Atr func New(a string) Atr { return Atr(a) } //Glue slice Atr to Atr func Glue(atr ...Atr) Atr { var endatr Atr lenatr := len(atr) for _, a0 := range atr { if a0 != "" { endatr = endatr + a0 if lenatr > 1 { endatr = endatr + sep } } lenatr-- } return endatr } //Split Atr to slice Atr func Split(a Atr) []Atr { var endatr []Atr split := strings.Split(string(a), string(sep)) for _, s := range split { endatr = append(endatr, Atr(s)) } return endatr }