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
@@ -6,11 +6,11 @@ import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
func (this *StringLiteral) UnmarshalJSON(data []byte) error {
|
||||
func (this *StringT) UnmarshalJSON(data []byte) error {
|
||||
var str string
|
||||
if err := json.Unmarshal(data, &str); err != nil {
|
||||
return err
|
||||
}
|
||||
*this = StringLiteral(str)
|
||||
*this = StringT(str)
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user