fix: golangci-lint 2 fixes (#769)

This commit is contained in:
Carlos Alexandro Becker
2025-03-31 14:18:18 -03:00
committed by GitHub
parent cce848148c
commit bd2a5b0c6a
13 changed files with 33 additions and 8 deletions
+3
View File
@@ -1 +1,4 @@
// Package bubbles provides some components for Bubble Tea applications. These
// components are used in production in Glow, Charm and many other
// applications.
package bubbles
+1
View File
@@ -1,3 +1,4 @@
// Package cursor provides cursor functionality for Bubble Tea applications.
package cursor
import (
+2
View File
@@ -1,3 +1,5 @@
// Package filepicker provides a file picker component for Bubble Tea
// applications.
package filepicker
import (
+1
View File
@@ -1,3 +1,4 @@
// Package help provides a simple help view for Bubble Tea applications.
package help
import (
+1 -1
View File
@@ -289,7 +289,7 @@ func (m *Model) SetFilterText(filter string) {
m.updateKeybindings()
}
// Helper method for setting the filtering state manually.
// SetFilterState allows setting the filtering state manually.
func (m *Model) SetFilterState(state FilterState) {
m.Paginator.Page = 0
m.cursor = 0
+1
View File
@@ -1,3 +1,4 @@
// Package progress provides a simple progress bar for Bubble Tea applications.
package progress
import (
+1
View File
@@ -1,3 +1,4 @@
// Package spinner provides a spinner component for Bubble Tea applications.
package spinner
import (
+1
View File
@@ -1,3 +1,4 @@
// Package table provides a simple table component for Bubble Tea applications.
package table
import (
+2
View File
@@ -1,3 +1,5 @@
// Package memoization is an internal package that provides a simple memoization
// for text area.
package memoization
import (
+2
View File
@@ -1,3 +1,5 @@
// Package textarea provides a multi-line text input component for Bubble Tea
// applications.
package textarea
import (
+15 -6
View File
@@ -1,3 +1,5 @@
// Package textinput provides a text input component for Bubble Tea
// applications.
package textinput
import (
@@ -760,15 +762,18 @@ func clamp(v, low, high int) int {
// Deprecated.
// Deprecated: use cursor.Mode.
// Deprecated: use [cursor.Mode].
//
//nolint:revive
type CursorMode int
//nolint:revive
const (
// Deprecated: use cursor.CursorBlink.
// Deprecated: use [cursor.CursorBlink].
CursorBlink = CursorMode(cursor.CursorBlink)
// Deprecated: use cursor.CursorStatic.
// Deprecated: use [cursor.CursorStatic].
CursorStatic = CursorMode(cursor.CursorStatic)
// Deprecated: use cursor.CursorHide.
// Deprecated: use [cursor.CursorHide].
CursorHide = CursorMode(cursor.CursorHide)
)
@@ -776,12 +781,16 @@ func (c CursorMode) String() string {
return cursor.Mode(c).String()
}
// Deprecated: use cursor.Mode().
// Deprecated: use [cursor.Mode].
//
//nolint:revive
func (m Model) CursorMode() CursorMode {
return CursorMode(m.Cursor.Mode())
}
// Deprecated: use cursor.SetMode().
//
//nolint:revive
func (m *Model) SetCursorMode(mode CursorMode) tea.Cmd {
return m.Cursor.SetMode(cursor.Mode(mode))
}
@@ -819,7 +828,7 @@ func (m *Model) MatchedSuggestions() []string {
return m.getSuggestions(m.matchedSuggestions)
}
// CurrentSuggestion returns the currently selected suggestion index.
// CurrentSuggestionIndex returns the currently selected suggestion index.
func (m *Model) CurrentSuggestionIndex() int {
return m.currentSuggestionIndex
}
+2
View File
@@ -1,3 +1,5 @@
// Package viewport provides a component for rendering a viewport in a Bubble
// Tea.
package viewport
import "github.com/charmbracelet/bubbles/key"
+1 -1
View File
@@ -178,7 +178,7 @@ func (m *Model) SetYOffset(n int) {
m.YOffset = clamp(n, 0, m.maxYOffset())
}
// PageDown moves the view down by the number of lines in the viewport.
// ViewDown moves the view down by the number of lines in the viewport.
// Basically, "page down".
//
// Deprecated: use [Model.PageDown] instead.