docs: fix lint issues in examples and tutorials (#759)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker
2023-06-09 13:33:53 -03:00
committed by GitHub
parent b2d2ac6504
commit b80eb8303b
18 changed files with 47 additions and 66 deletions

View File

@@ -53,7 +53,7 @@ func newModel() model {
}
func (m model) Init() tea.Cmd {
return spinner.Tick
return m.spinner.Tick
}
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
@@ -100,14 +100,12 @@ func (m model) View() string {
}
func main() {
rand.Seed(time.Now().UTC().UnixNano())
p := tea.NewProgram(newModel())
// Simulate activity
go func() {
for {
pause := time.Duration(rand.Int63n(899)+100) * time.Millisecond
pause := time.Duration(rand.Int63n(899)+100) * time.Millisecond // nolint:gosec
time.Sleep(pause)
// Send the Bubble Tea program a message from outside the
@@ -129,5 +127,5 @@ func randomFood() string {
"a kohlrabi", "some spaghetti", "tacos", "a currywurst", "some curry",
"a sandwich", "some peanut butter", "some cashews", "some ramen",
}
return string(food[rand.Intn(len(food))])
return food[rand.Intn(len(food))] // nolint:gosec
}