mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-05 16:30:07 +00:00
simplify stringlist
This commit is contained in:
1 parent
a403859105
commit
2d233295e6
14 files changed
+120
-143
No files matched your search
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user