如何防止此函数在 Golang 中受到 SQL 注入攻击?

问题描述 投票:0回答:0

我是 golang 的新手。当我编写此代码以显示详细数据产品时,我遇到了问题。此代码易受 SQL 注入攻击。我正在使用框架 Gin,Gorm

function show detail data product

我如何防止此参数 ID 受到 SQL 注入攻击,或者我如何仅在参数中进行验证以防止 SQL 注入?谢谢

防止 SQL 注入易受攻击的参数 id

mysql go sql-injection
© www.soinside.com 2019 - 2024. All rights reserved.