third-platform-sdk/sdk/dunion-go-sdk/model/response.go

14 lines
290 B
Go
Raw Permalink Normal View History

2024-05-13 23:18:54 +08:00
package model
import "fmt"
type Response struct {
Errno int64 `json:"errno"`
ErrMsg string `json:"errmsg"`
TraceID string `json:"traceid"`
}
func (r Response) ErrorMsg() string {
return fmt.Sprintf("错误码:%d, 错误信息: %s, traceID: %s", r.Errno, r.ErrMsg, r.TraceID)
}