code: func (srv *Server) getMessage() (interface{}, error) {
  	var rawXMLMsgBytes []byte
  	var err error
  	if srv.isSafeMode {
  		var encryptedXMLMsg message.EncryptedXMLMsg
  		if err := xml.NewDecoder(srv.Request.Body).Decode(&encryptedXMLMsg); err != nil {
  			return nil, fmt.Errorf("从body中解析xml失败,err=%v", err)
  		}
  
  		//验证消息签名
  		timestamp := srv.Query("timestamp")
  		srv.timestamp, err = strconv.ParseInt(timestamp, 10, 32)
  		if err != nil {
  			return nil, err
  		}
  		nonce := srv.Query("nonce")
  		srv.nonce = nonce
  		msgSignature := srv.Query("msg_signature")
  		msgSignatureGen := util.Signature(srv.Token, timestamp, nonce, encryptedXMLMsg.EncryptedMsg)
  		if msgSignature != msgSignatureGen {
  			return nil, fmt.Errorf("消息不合法，验证签名失败")
  		}
  
  		//解密
  		srv.random, rawXMLMsgBytes, err = util.DecryptMsg(srv.AppID, encryptedXMLMsg.EncryptedMsg, srv.EncodingAESKey)
  		if err != nil {
  			return nil, fmt.Errorf("消息解密失败, err=%v", err)
  		}
  	} else {
  		rawXMLMsgBytes, err = ioutil.ReadAll(srv.Request.Body)
  		if err != nil {
  			return nil, fmt.Errorf("从body中解析xml失败, err=%v", err)
  		}
  	}
  
  	srv.requestRawXMLMsg = rawXMLMsgBytes
  
  	return srv.parseRequestMessage(rawXMLMsgBytes)
  }
docs: //getMessage 解析微信返回的消息