瀏覽代碼

fix: 添加 CDATA 注释

陈灿鑫 6 年之前
父節點
當前提交
bf456aa77b
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      message/message.go

+ 1 - 0
message/message.go

@@ -184,6 +184,7 @@ type CommonToken struct {
 	MsgType      MsgType  `xml:"MsgType"`
 }
 
+// CDATA  使用该类型,在序列化为 xml 文本时文本会被解析器忽略
 type CDATA string
 
 func (c CDATA) MarshalXML(e *xml.Encoder, start xml.StartElement) error {