mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 11:09:17 -07:00
chore: clean up linter errors in examples
This commit is contained in:
@@ -50,13 +50,12 @@ type model struct {
|
||||
progress progress.Model
|
||||
}
|
||||
|
||||
func (_ model) Init() tea.Cmd {
|
||||
func (m model) Init() tea.Cmd {
|
||||
return tickCmd()
|
||||
}
|
||||
|
||||
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
switch msg := msg.(type) {
|
||||
|
||||
case tea.KeyMsg:
|
||||
return m, tea.Quit
|
||||
|
||||
@@ -80,10 +79,10 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
}
|
||||
|
||||
func (e model) View() string {
|
||||
func (m model) View() string {
|
||||
pad := strings.Repeat(" ", padding)
|
||||
return "\n" +
|
||||
pad + e.progress.ViewAs(e.percent) + "\n\n" +
|
||||
pad + m.progress.ViewAs(m.percent) + "\n\n" +
|
||||
pad + helpStyle("Press any key to quit")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user