Chore: Fix SQL related Go variable naming (#28887)

* Chore: Fix variable naming

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-11-11 06:21:08 +01:00
committed by GitHub
parent 7abf0506b1
commit b5379c5335
68 changed files with 377 additions and 376 deletions

View File

@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/assert"
)
func TestSqlBuilder(t *testing.T) {
func TestSQLBuilder(t *testing.T) {
t.Run("writeDashboardPermissionFilter", func(t *testing.T) {
t.Run("user ACL", func(t *testing.T) {
test(t,
@ -317,8 +317,8 @@ func createDummyAcl(dashboardPermission *DashboardPermission, search Search, das
return 0, err
}
func getDashboards(sqlStore *SqlStore, search Search, aclUserId int64) ([]*dashboardResponse, error) {
builder := &SqlBuilder{}
func getDashboards(sqlStore *SQLStore, search Search, aclUserId int64) ([]*dashboardResponse, error) {
builder := &SQLBuilder{}
signedInUser := &models.SignedInUser{
UserId: 9999999999,
}
@ -341,6 +341,6 @@ func getDashboards(sqlStore *SqlStore, search Search, aclUserId int64) ([]*dashb
var res []*dashboardResponse
builder.Write("SELECT * FROM dashboard WHERE true")
builder.writeDashboardPermissionFilter(signedInUser, search.RequiredPermission)
err := sqlStore.engine.SQL(builder.GetSqlString(), builder.params...).Find(&res)
err := sqlStore.engine.SQL(builder.GetSQLString(), builder.params...).Find(&res)
return res, err
}