Shorten StringLiteral

This commit is contained in:
v2ray committed 2016-05-23 20:23:40 +02:00
1 parent cfdda19834
commit 47b2fafb32
15 files changed
+57 -57

No files matched your search

+2 -2
View File
@@ -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
}