We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
model
type AdminAddInput struct { Name string `json:"name"` //用户名 Password string `json:"password"` //密码 RoleIds *string `json:"roleIds"` //角色列表 IsAdmin uint8 `json:"isAdmin"` //是否是管理员 }
logic
func (a *sAdmin) Add(ctx context.Context, input model.AdminAddInput) error { if err := ghtml.SpecialCharsMapOrStruct(input); err != nil { return gerror.New(exceptions.XssException) } //业务代码 return nil }
接口请求参数如下 The interface request parameters are as follows
报错信息如下 The error message is as follows
换成地址传值却正常调用 Change to address and pass value but call normally
我的另一个接口不使用地址传值却也正常运行 My other interface doesn't use address transfer, but it still runs normally
The text was updated successfully, but these errors were encountered:
@1cccccc Hello, the input parameter of function ghtml.SpecialCharsMapOrStruct should be type of pointer. I'll improve the validation of the function.
ghtml.SpecialCharsMapOrStruct
Sorry, something went wrong.
SpecialCharsMapOrStruct
gqcn
Successfully merging a pull request may close this issue.
model
logic
接口请求参数如下
The interface request parameters are as follows
报错信息如下
The error message is as follows
换成地址传值却正常调用
Change to address and pass value but call normally
我的另一个接口不使用地址传值却也正常运行
My other interface doesn't use address transfer, but it still runs normally
The text was updated successfully, but these errors were encountered: