mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-04 20:26:08 +00:00
fix: lint issues
This commit is contained in:
@@ -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
|
||||
// code complexity involved in preallocating this slice.
|
||||
//nolint:prealloc
|
||||
var (
|
||||
out []string
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package list
|
||||
package list //nolint:revive
|
||||
|
||||
import "charm.land/bubbles/v2/key"
|
||||
|
||||
|
||||
+1
-5
@@ -851,8 +851,6 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
|
||||
|
||||
// Updates for when a user is browsing the list.
|
||||
func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd {
|
||||
var cmds []tea.Cmd
|
||||
|
||||
switch msg := msg.(type) {
|
||||
case tea.KeyPressMsg:
|
||||
switch {
|
||||
@@ -904,11 +902,9 @@ func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd {
|
||||
}
|
||||
|
||||
cmd := m.delegate.Update(msg, m)
|
||||
cmds = append(cmds, cmd)
|
||||
|
||||
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.
|
||||
|
||||
+1
-1
@@ -403,7 +403,7 @@ func (m *Model) GotoBottom() {
|
||||
// default for getting all the rows and the given separator for the fields on
|
||||
// each row.
|
||||
func (m *Model) FromValues(value, separator string) {
|
||||
rows := []Row{}
|
||||
rows := []Row{} //nolint:prealloc
|
||||
for _, line := range strings.Split(value, "\n") {
|
||||
r := Row{}
|
||||
for _, field := range strings.Split(line, separator) {
|
||||
|
||||
Reference in New Issue
Block a user