Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

25 lines
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. }