Skip to content

Commit dde0ca9

Browse files
committed
addressing lint [p2] items
1 parent 32e13b9 commit dde0ca9

6 files changed

Lines changed: 29 additions & 15 deletions

File tree

cmd/slackdump/internal/diag/merge.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,11 @@ func mergeSource(ctx context.Context, target mergeTarget, conn *sqlx.DB, src sou
288288
if err != nil {
289289
return fmt.Errorf("creating session: %w", err)
290290
}
291-
defer dbp.Abort()
291+
defer func() {
292+
if err := dbp.Abort(); err != nil {
293+
slog.WarnContext(ctx, "aborting merge session", "error", err)
294+
}
295+
}()
292296

293297
// Workspace info
294298
if wsi, err := src.WorkspaceInfo(ctx); err == nil {

cmd/slackdump/internal/diag/tools.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,5 @@ Tools command contains different tools, running which may be requested if you op
5555
cmdUninstall,
5656
cmdUnzip,
5757
cmdUpdate,
58-
// cmdWizDebug,
5958
},
6059
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) 2021-2026 Rustam Gilyazov and Contributors.
2+
//
3+
// This program is free software: you can redistribute it and/or modify
4+
// it under the terms of the GNU Affero General Public License as published by
5+
// the Free Software Foundation, either version 3 of the License, or
6+
// (at your option) any later version.
7+
//
8+
// This program is distributed in the hope that it will be useful,
9+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
// GNU Affero General Public License for more details.
12+
//
13+
// You should have received a copy of the GNU Affero General Public License
14+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
16+
//go:build debug
17+
18+
package diag
19+
20+
func init() {
21+
CmdDiag.Commands = append(CmdDiag.Commands, cmdWizDebug)
22+
}

cmd/slackdump/internal/diag/wizdebug.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// You should have received a copy of the GNU Affero General Public License
1414
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1515

16+
//go:build debug
17+
1618
package diag
1719

1820
import (

internal/edge/slacker.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ func (cl *Client) GetConversationsContextEx(ctx context.Context, p *slack.GetCon
4343
return cl.getConversationsContext(ctx, p, onlyMy)
4444
}
4545

46-
// group type parameter mapping
47-
var channelTypeMap = map[string]string{
48-
structures.CPrivate: string(SCTPrivate),
49-
structures.CPublic: string(SCTPrivateExclude),
50-
}
51-
5246
type searchResult struct {
5347
Channels []slack.Channel
5448
Err error

internal/viewer/renderer/slack_types.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ var (
4444
// rte - rich text element
4545
var (
4646
rteTypeHandlers = map[slack.RichTextElementType]func(*Slack, slack.RichTextElement) (string, string, error){}
47-
48-
rteTypeClass = map[slack.RichTextElementType]string{
49-
slack.RTESection: "slack-rich-text-section",
50-
slack.RTEList: "slack-rich-text-list",
51-
slack.RTEQuote: "slack-rich-text-quote",
52-
slack.RTEPreformatted: "slack-rich-text-preformatted",
53-
}
5447
)
5548

5649
func init() {

0 commit comments

Comments
 (0)