package entity import "fmt" // Error 通用错误 type Error struct { Code float64 `json:"errcode"` Message string `json:"errmsg"` } func (e Error) Error() string { return fmt.Sprintf("[%d] - %s", int(e.Code), e.Message) }