go-zero
go-zero copied to clipboard
In the api file, using `any` instead of `interface {}` report an error
trafficstars
Describe the bug
In the api file, using any instead of interface {} report an error
-
The code is
PageHomeResp{ PageConfig map[string]interface{} `json:"page_config"` PageConfig2 map[string]any `json:"page_config"` // report error } -
The error is
can not found declaration 'any' in context
Environments (please complete the following information):
- OS: windows
- go-zero version [e.g. 1.2.1]:1.5.2
- goctl version [e.g. 1.2.1, optional]:1.20.2
update goctl and go-zero
goctl currently does not support any in the generated struct.
interface{} doesn't work as well.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.