articles/when-to-use-panic-in-go #274
Replies: 1 comment
-
|
我感觉 SQL注入防护 不应该使用panic,既然是用户注入的,万一恶意一直注入不满足条件的orderBy,程序不是一直崩溃?应该返回error并且增加黑名单机制封掉这个请求的ip才是。个人理解,非喜勿喷。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
articles/when-to-use-panic-in-go
深入探讨Go语言中何时应该使用panic而非返回错误,通过实例分析了预期错误与代码缺陷的区别,以及在安全检查、配置加载等场景中的最佳错误处理策略。
https://goframe.org/articles/when-to-use-panic-in-go
Beta Was this translation helpful? Give feedback.
All reactions