github.com/chanxuehong/wechat@v0.0.0-20230222024006-36f0325263cd/oauth2/error.go (about) 1 package oauth2 2 3 import ( 4 "fmt" 5 ) 6 7 const ( 8 ErrCodeOK = 0 9 ) 10 11 type Error struct { 12 ErrCode int64 `json:"errcode"` 13 ErrMsg string `json:"errmsg"` 14 } 15 16 func (err *Error) Error() string { 17 return fmt.Sprintf("errcode: %d, errmsg: %s", err.ErrCode, err.ErrMsg) 18 }