-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
After upgraded to v2.5.2, defined as "*", but it should be named with "Res" suffix like "XxxRes" #2955
Comments
目测是支持泛型了,就不能用 [] 了 下面是部分源码
|
如果不能用[]了, 后续想升级gf最新版本, 好几十个接口要改 |
If [] cannot be used anymore, I want to upgrade to the latest version of gf later. Dozens of interfaces need to be changed. |
您好,我已经收到了你的来信
|
Hello, I have received your letter |
@mason51 对,参考这个来修改吧,其实使用正则来做批量替换也可以实现的。 |
@mason51 Yes, refer to this to modify it. In fact, batch replacement can also be achieved using regular expressions. |
1. What version of
Go
and system type/arch are you using?1.20.4
2. What version of
GoFrame
are you using?v2.5.2
3. Can this issue be re-produced with the latest release?
Yes
4. What did you do?
5. What did you expect to see?
6. What did you see instead?
在 v2.5.1 的时候, res []user.MenuListRes 是可以用的, 但升级到 v2.5.2, 就会报错.
invalid struct naming for response: defined as "", but it should be named with "Res" suffix like "XxxRes"
同样, 当前最新版的 v2.5.3 也会报错.
如果, 我把 res *[]user.MenuListRes 改成 res *user.MenuListRes, 也就是不用数组, 就不报错.
所以, 请问这是 gf 的 bug? 还是后续不能再用数组?
The text was updated successfully, but these errors were encountered: