添加golangci-lint配置

This commit is contained in:
刘祥超
2023-08-08 18:36:24 +08:00
parent 6de2834a8c
commit 977a12843c
5 changed files with 85 additions and 4 deletions

View File

@@ -160,7 +160,7 @@ func (this *SysLockerDAO) Increase(tx *dbs.Tx, key string, defaultValue int64) (
colValue, err := tx.FindCol(0, "INSERT INTO `"+this.Table+"` (`key`, `version`) VALUES ('"+key+"', "+types.String(defaultValue+sysLockerStep)+") ON DUPLICATE KEY UPDATE `version`=`version`+"+types.String(sysLockerStep)+"; SELECT `version` FROM `"+this.Table+"` WHERE `key`='"+key+"'")
if err != nil {
if CheckSQLErrCode(err, 1064 /** syntax error **/) {
// continue to use seperated query
// continue to use separated query
err = nil
} else {
return 0, err