fix: lint issues

This commit is contained in:
Ayman Bagabas
2026-02-23 23:18:55 +03:00
parent f744b929dd
commit af98365cc6
4 changed files with 3 additions and 8 deletions
-1
View File
@@ -175,7 +175,6 @@ func (m Model) FullHelpView(groups [][]key.Binding) string {
// Linter note: at this time we don't think it's worth the additional // Linter note: at this time we don't think it's worth the additional
// code complexity involved in preallocating this slice. // code complexity involved in preallocating this slice.
//nolint:prealloc
var ( var (
out []string out []string
+1 -1
View File
@@ -1,4 +1,4 @@
package list package list //nolint:revive
import "charm.land/bubbles/v2/key" import "charm.land/bubbles/v2/key"
+1 -5
View File
@@ -851,8 +851,6 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
// Updates for when a user is browsing the list. // Updates for when a user is browsing the list.
func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd { func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd {
var cmds []tea.Cmd
switch msg := msg.(type) { switch msg := msg.(type) {
case tea.KeyPressMsg: case tea.KeyPressMsg:
switch { switch {
@@ -904,11 +902,9 @@ func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd {
} }
cmd := m.delegate.Update(msg, m) cmd := m.delegate.Update(msg, m)
cmds = append(cmds, cmd)
m.cursor = clamp(m.cursor, 0, m.maxCursorIndex()) m.cursor = clamp(m.cursor, 0, m.maxCursorIndex())
return tea.Batch(cmds...) return cmd
} }
// Updates for when a user is in the filter editing interface. // Updates for when a user is in the filter editing interface.
+1 -1
View File
@@ -403,7 +403,7 @@ func (m *Model) GotoBottom() {
// default for getting all the rows and the given separator for the fields on // default for getting all the rows and the given separator for the fields on
// each row. // each row.
func (m *Model) FromValues(value, separator string) { func (m *Model) FromValues(value, separator string) {
rows := []Row{} rows := []Row{} //nolint:prealloc
for _, line := range strings.Split(value, "\n") { for _, line := range strings.Split(value, "\n") {
r := Row{} r := Row{}
for _, field := range strings.Split(line, separator) { for _, field := range strings.Split(line, separator) {