ls 5 years ago
parent
commit
ea403ed6c6
2 changed files with 3 additions and 5 deletions
  1. 2 3
      wechat/request.go
  2. 1 2
      wechat/response.go

+ 2 - 3
wechat/request.go

@@ -5,13 +5,12 @@ import (
 	"encoding/json"
 	"encoding/xml"
 	"errors"
-	"fmt"
 
 	"git.chuangxin1.com/cx/myth"
 )
 
 func checkJSONError(msg myth.HTTPMessage) (jq *myth.JSONQuery, err error) {
-	fmt.Println(msg.StatusCode, string(msg.Body))
+	//fmt.Println(msg.StatusCode, string(msg.Body))
 	if msg.StatusCode == 200 {
 		jq, err = msg.JSONQuery()
 		if err != nil {
@@ -60,7 +59,7 @@ func getBody(uri string) (msg myth.HTTPMessage, err error) {
 	if err != nil {
 		return
 	}
-	fmt.Println(msg.StatusCode, string(msg.Body))
+	//fmt.Println(msg.StatusCode, string(msg.Body))
 	if msg.StatusCode == 200 {
 		jq := &myth.JSONQuery{}
 		jq, err = msg.JSONQuery()

+ 1 - 2
wechat/response.go

@@ -1,7 +1,6 @@
 package wechat
 
 import (
-	"fmt"
 	"sync"
 	"time"
 
@@ -40,7 +39,7 @@ func ReplyNews(msg Message, items []ArticleItem) (reply ReplyMessage) {
 	reply.Articles = articles
 
 	bs, _ := xml.Marshal(reply)
-	fmt.Println(string(bs))
+	//fmt.Println(string(bs))
 
 	return
 }