response.go 159 B

12345678910111213
  1. package wechat
  2. import (
  3. "errors"
  4. )
  5. func (r ResponseMsg) Check() (err error) {
  6. if r.ErrCode == ErrResOk {
  7. return
  8. }
  9. err = errors.New(r.ErrMsg)
  10. return
  11. }