1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-24 08:22:29 +02:00

fix linter errors

This commit is contained in:
wiggin77 2023-01-26 12:26:01 -05:00
parent c6b2c28394
commit 0c19e1c950
2 changed files with 5 additions and 22 deletions

View File

@ -127,27 +127,6 @@ func (s *SQLStore) DBType() string {
return s.dbType
}
// DBVersion returns the DB version used for the store.
func (s *SQLStore) DBVersion() string {
var sql string
switch s.dbType {
case model.SqliteDBType:
sql = "SELECT sqlite_version() AS version;"
default:
sql = "SELECT version() AS version"
}
row := s.db.QueryRow(sql)
var version string
if err := row.Scan(&version); err != nil {
s.logger.Error("error getting database version", mlog.Err(err))
return "unknown"
}
return version
}
func (s *SQLStore) getQueryBuilder(db sq.BaseRunner) sq.StatementBuilderType {
builder := sq.StatementBuilder
if s.dbType == model.PostgresDBType || s.dbType == model.SqliteDBType {
@ -206,7 +185,7 @@ func (s *SQLStore) getChannel(db sq.BaseRunner, teamID, channel string) (*mmMode
return nil, store.NewNotSupportedError("get channel not supported on standalone mode")
}
func (s *SQLStore) dBVersion() string {
func (s *SQLStore) DBVersion() string {
var version string
var row *sql.Row

View File

@ -32,6 +32,7 @@ func createTestUsers(t *testing.T, store store.Store, num int) []*model.User {
return users
}
//nolint:unparam
func createTestBlocks(t *testing.T, store store.Store, userID string, num int) []*model.Block {
var blocks []*model.Block
for i := 0; i < num; i++ {
@ -72,6 +73,7 @@ func createTestBlocksForCard(t *testing.T, store store.Store, cardID string, num
return blocks
}
//nolint:unparam
func createTestCards(t *testing.T, store store.Store, userID string, boardID string, num int) []*model.Block {
var blocks []*model.Block
for i := 0; i < num; i++ {
@ -91,6 +93,7 @@ func createTestCards(t *testing.T, store store.Store, userID string, boardID str
return blocks
}
//nolint:unparam
func createTestBoards(t *testing.T, store store.Store, teamID string, userID string, num int) []*model.Board {
var boards []*model.Board
for i := 0; i < num; i++ {
@ -109,6 +112,7 @@ func createTestBoards(t *testing.T, store store.Store, teamID string, userID str
return boards
}
//nolint:unparam
func deleteTestBoard(t *testing.T, store store.Store, boardID string, userID string) {
err := store.DeleteBoard(boardID, userID)
require.NoError(t, err)