Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

25 linhas
492B

  1. package main
  2. import "net/http"
  3. //
  4. //InWechatMsg what we received currently from wechat
  5. type InWechatMsg struct {
  6. header CommonHeader
  7. body interface{} //dynamic type
  8. req *http.Request
  9. instantResponse chan string //instance reply channel
  10. }
  11. func (m *InWechatMsg) init() {
  12. m.instantResponse = make(chan string)
  13. }
  14. func (m *InWechatMsg) destroy() {
  15. close(m.instantResponse)
  16. }
  17. func (m *InWechatMsg) immediateResponse(s string) {
  18. m.instantResponse <- s
  19. }