simplify stringlist

This commit is contained in:
v2ray
2016-01-15 15:23:12 +01:00
parent a403859105
commit 2d233295e6
14 changed files with 120 additions and 143 deletions
+15
View File
@@ -0,0 +1,15 @@
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)
}