Open xixihahag opened 6 months ago
对于默认值的设置,目前没有递归的检查结构体,可以把HelloOption改成匿名的结构体试试
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
For the setting of default values, there is currently no recursive checking structure. You can try changing HelloOption to an anonymous structure.
Go version
go version go1.21.3 darwin/amd64
GoFrame version
2.7.1
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
请求 Hello 接口,没有传任何值
What did you see happen?
HelloOption 结构体里面的值不会被初始化
What did you expect to see?
期望请求里面的值都会被设置成默认值