mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-21 07:07:08 +00:00
Shorten StringLiteral
This commit is contained in:
1 parent
cfdda19834
commit
47b2fafb32
15 files changed
+57
-57
No files matched your search
@@ -1,15 +1,15 @@
|
||||
package serial
|
||||
|
||||
type StringLiteralList []StringLiteral
|
||||
type StringTList []StringT
|
||||
|
||||
func NewStringLiteralList(raw []string) *StringLiteralList {
|
||||
list := StringLiteralList(make([]StringLiteral, len(raw)))
|
||||
func NewStringTList(raw []string) *StringTList {
|
||||
list := StringTList(make([]StringT, len(raw)))
|
||||
for idx, str := range raw {
|
||||
list[idx] = StringLiteral(str)
|
||||
list[idx] = StringT(str)
|
||||
}
|
||||
return &list
|
||||
}
|
||||
|
||||
func (this *StringLiteralList) Len() int {
|
||||
func (this *StringTList) Len() int {
|
||||
return len(*this)
|
||||
}
|
||||
Reference in new issue
Block a user