helper.go 528 B

123456789101112131415161718192021222324
  1. package base
  2. import "fmt"
  3. const (
  4. ReturnCodeSuccess = "SUCCESS"
  5. ReturnCodeFail = "FAIL"
  6. )
  7. const (
  8. ResultCodeSuccess = "SUCCESS"
  9. ResultCodeFail = "FAIL"
  10. )
  11. //Error error
  12. type Error struct {
  13. XMLName struct{} `xml:"xml" json:"-"`
  14. ReturnCode string `xml:"return_code" json:"return_code"`
  15. ReturnMsg string `xml:"return_msg,omitempty" json:"return_msg,omitempty"`
  16. }
  17. func (e *Error) Error() string {
  18. return fmt.Sprintf("return_code: %q, return_msg: %q", e.ReturnCode, e.ReturnMsg)
  19. }