File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 55 "context"
66 "encoding/json"
77 "encoding/xml"
8- "fmt"
98 "io"
109 "net/http"
1110 "net/url"
@@ -305,17 +304,17 @@ type CIDocCompareOptions struct {
305304}
306305
307306type CIDocCompareResult struct {
308- Code string `xml:"Code,omitempty" json:"code,omitempty"`
309- ETag string `xml:"ETag,omitempty" json:"eTag,omitempty"`
310- Msg string `xml:"Msg,omitempty" json:"msg,omitempty"`
311- ResultPath string `xml:"ResultPath,omitempty" json:"resultPath,omitempty"`
307+ XMLName xml.Name `xml:"Response"`
308+ Code string `xml:"Code,omitempty" json:"code,omitempty"`
309+ ETag string `xml:"ETag,omitempty" json:"eTag,omitempty"`
310+ Msg string `xml:"Msg,omitempty" json:"msg,omitempty"`
311+ ResultPath string `xml:"ResultPath,omitempty" json:"resultPath,omitempty"`
312312}
313313
314314// 优先 json
315315func (w * CIDocCompareResult ) Write (p []byte ) (n int , err error ) {
316316 err = json .Unmarshal (p , w )
317317 if err != nil {
318- fmt .Println (err .Error ())
319318 err = xml .NewDecoder (bytes .NewReader (p )).Decode (w )
320319 if err == nil {
321320 return len (p ), nil
You can’t perform that action at this time.
0 commit comments