Make golint happier

This commit is contained in:
Julian Kornberger
2018-03-22 12:37:35 +01:00
parent 624dac16fa
commit 7aab6a8887
33 changed files with 289 additions and 293 deletions

View File

@@ -25,19 +25,19 @@ func Search(c *m.ReqContext) {
permission = m.PERMISSION_EDIT
}
dbids := make([]int64, 0)
dbIDs := make([]int64, 0)
for _, id := range c.QueryStrings("dashboardIds") {
dashboardId, err := strconv.ParseInt(id, 10, 64)
dashboardID, err := strconv.ParseInt(id, 10, 64)
if err == nil {
dbids = append(dbids, dashboardId)
dbIDs = append(dbIDs, dashboardID)
}
}
folderIds := make([]int64, 0)
folderIDs := make([]int64, 0)
for _, id := range c.QueryStrings("folderIds") {
folderId, err := strconv.ParseInt(id, 10, 64)
folderID, err := strconv.ParseInt(id, 10, 64)
if err == nil {
folderIds = append(folderIds, folderId)
folderIDs = append(folderIDs, folderID)
}
}
@@ -48,9 +48,9 @@ func Search(c *m.ReqContext) {
Limit: limit,
IsStarred: starred == "true",
OrgId: c.OrgId,
DashboardIds: dbids,
DashboardIds: dbIDs,
Type: dashboardType,
FolderIds: folderIds,
FolderIds: folderIDs,
Permission: permission,
}