chore: apply appropriate GoDoc syntax to deprecated items

This commit is contained in:
Christian Rocha
2022-11-17 10:41:13 -05:00
parent eb09d7539c
commit 30c01cabdc
6 changed files with 13 additions and 14 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ func New() Model {
// NewModel creates a new help view with some useful defaults. // NewModel creates a new help view with some useful defaults.
// //
// Deprecated. Use New instead. // Deprecated: use [New] instead.
var NewModel = New var NewModel = New
// Update helps satisfy the Bubble Tea Model interface. It's a no-op. // Update helps satisfy the Bubble Tea Model interface. It's a no-op.
+1 -1
View File
@@ -231,7 +231,7 @@ func New(items []Item, delegate ItemDelegate, width, height int) Model {
// NewModel returns a new model with sensible defaults. // NewModel returns a new model with sensible defaults.
// //
// Deprecated. Use New instead. // Deprecated: use [New] instead.
var NewModel = New var NewModel = New
// SetFilteringEnabled enables or disables filtering. Note that this is different // SetFilteringEnabled enables or disables filtering. Note that this is different
+6 -6
View File
@@ -53,15 +53,15 @@ type Model struct {
// KeyMap encodes the keybindings recognized by the widget. // KeyMap encodes the keybindings recognized by the widget.
KeyMap KeyMap KeyMap KeyMap
// Deprecated: customize KeyMap instead. // Deprecated: customize [KeyMap] instead.
UsePgUpPgDownKeys bool UsePgUpPgDownKeys bool
// Deprecated: customize KeyMap instead. // Deprecated: customize [KeyMap] instead.
UseLeftRightKeys bool UseLeftRightKeys bool
// Deprecated: customize KeyMap instead. // Deprecated: customize [KeyMap] instead.
UseUpDownKeys bool UseUpDownKeys bool
// Deprecated: customize KeyMap instead. // Deprecated: customize [KeyMap] instead.
UseHLKeys bool UseHLKeys bool
// Deprecated: customize KeyMap instead. // Deprecated: customize [KeyMap] instead.
UseJKKeys bool UseJKKeys bool
} }
@@ -141,7 +141,7 @@ func New() Model {
// NewModel creates a new model with defaults. // NewModel creates a new model with defaults.
// //
// Deprecated. Use New instead. // Deprecated: use [New] instead.
var NewModel = New var NewModel = New
// Update is the Tea update function which binds keystrokes to pagination. // Update is the Tea update function which binds keystrokes to pagination.
+1 -1
View File
@@ -191,7 +191,7 @@ func New(opts ...Option) Model {
// NewModel returns a model with default values. // NewModel returns a model with default values.
// //
// Deprecated. Use New instead. // Deprecated: use [New] instead.
var NewModel = New var NewModel = New
// Init exists satisfy the tea.Model interface. // Init exists satisfy the tea.Model interface.
+2 -2
View File
@@ -124,7 +124,7 @@ func New(opts ...Option) Model {
// NewModel returns a model with default values. // NewModel returns a model with default values.
// //
// Deprecated. Use New instead. // Deprecated: use [New] instead.
var NewModel = New var NewModel = New
// TickMsg indicates that the timer has ticked and we should render a frame. // TickMsg indicates that the timer has ticked and we should render a frame.
@@ -201,7 +201,7 @@ func (m Model) tick(id, tag int) tea.Cmd {
// Tick is the command used to advance the spinner one frame. Use this command // Tick is the command used to advance the spinner one frame. Use this command
// to effectively start the spinner. // to effectively start the spinner.
// //
// This method is deprecated. Use Model.Tick instead. // Deprecated: Use [Model.Tick] instead.
func Tick() tea.Msg { func Tick() tea.Msg {
return TickMsg{Time: time.Now()} return TickMsg{Time: time.Now()}
} }
+2 -3
View File
@@ -84,8 +84,7 @@ type Model struct {
EchoCharacter rune EchoCharacter rune
Cursor cursor.Model Cursor cursor.Model
// Deprecated: use cursor.BlinkSpeed instead. // Deprecated: use [cursor.BlinkSpeed] instead.
// This is unused and will be removed in the future.
BlinkSpeed time.Duration BlinkSpeed time.Duration
// Styles. These will be applied as inline styles. // Styles. These will be applied as inline styles.
@@ -150,7 +149,7 @@ func New() Model {
// NewModel creates a new model with default settings. // NewModel creates a new model with default settings.
// //
// Deprecated. Use New instead. // Deprecated: Use [New] instead.
var NewModel = New var NewModel = New
// SetValue sets the value of the text input. // SetValue sets the value of the text input.