-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use map type in generics ? #1711
Labels
Comments
marsberrys
changed the title
why can not use map type in generics ?
Can not use map type in generics ?
Dec 7, 2023
marsberrys
changed the title
Can not use map type in generics ?
How to use map type in generics ?
Dec 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// @response 200 {object} res.Result[map[string]dashboard.DailyStatistics]
whene run swag init , it report error: "Error parsing type definition 'res.Result-map[string]dashboard_DailyStatistics': data: cannot find type definition: map[string]dashboard.DailyStatistics"
type Result[T any] struct {
Code int64
json:"code"
// 返回码,正常返回 0;错误时返回对应错误码ErrorMsg string
json:"err_msg,omitempty"
// 错误信息,错误时返回Data T
json:"data,omitempty"
// 返回内容,正常时返回RequestID string
json:"request_id"
// 请求跟踪 ID (Trace ID)}
The text was updated successfully, but these errors were encountered: