소스 검색

remove verbose print

master
Patrick Peng Sun 8 년 전
부모
커밋
526985890d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      server.go

+ 2
- 2
server.go 파일 보기

// //
func answerWechatPost(w http.ResponseWriter, r *http.Request) { func answerWechatPost(w http.ResponseWriter, r *http.Request) {
body, _ := ioutil.ReadAll(r.Body) body, _ := ioutil.ReadAll(r.Body)
fmt.Printf("get body: %s", string(body))
//fmt.Printf("get body: %s", string(body))
s := ReadEncryptedMsg(string(body)) s := ReadEncryptedMsg(string(body))
//fmt.Printf("to decrypt %s", s.Encrypt) //fmt.Printf("to decrypt %s", s.Encrypt)
d := Decode(s.Encrypt) d := Decode(s.Encrypt)
fmt.Printf("decrypt as: %s", d)
//fmt.Printf("decrypt as: %s", d)
h := ReadCommonHeader(d) h := ReadCommonHeader(d)
reply, _ := BuildTextMsg(h.MsgType, h.FromUserName) reply, _ := BuildTextMsg(h.MsgType, h.FromUserName)
fmt.Fprint(w, reply) fmt.Fprint(w, reply)

Loading…
취소
저장