Upgrade golangci-lint

- Fix a SQL string concatenation
- Install golangci-lint using `tools.go`
This commit is contained in:
Deluan
2020-10-12 11:30:41 -04:00
committed by Deluan Quintão
parent fd6edf967f
commit ae817da223
6 changed files with 225 additions and 9 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ var once sync.Once
func isDBInitialized(tx *sql.Tx) (initialized bool) {
once.Do(func() {
rows, err := tx.Query("select count(*) from property where id='" + consts.InitialSetupFlagKey + "'")
rows, err := tx.Query("select count(*) from property where id=?", consts.InitialSetupFlagKey)
checkErr(err)
initialized = checkCount(rows) > 0
})