v2ray-core/common/serial/string_list.go

16 lines
323 B
Go
Raw Normal View History

2016-01-15 14:23:12 +00:00
package serial
type StringLiteralList []StringLiteral
func NewStringLiteralList(raw []string) *StringLiteralList {
list := StringLiteralList(make([]StringLiteral, len(raw)))
for idx, str := range raw {
list[idx] = StringLiteral(str)
}
return &list
}
func (this *StringLiteralList) Len() int {
return len(*this)
}