mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
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:
committed by
GitHub
parent
b2d2ac6504
commit
b80eb8303b
@@ -19,8 +19,6 @@ import (
|
||||
var helpStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("241")).Render
|
||||
|
||||
func main() {
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
|
||||
var (
|
||||
daemonMode bool
|
||||
showHelp bool
|
||||
@@ -77,7 +75,7 @@ func newModel() model {
|
||||
func (m model) Init() tea.Cmd {
|
||||
log.Println("Starting work...")
|
||||
return tea.Batch(
|
||||
spinner.Tick,
|
||||
m.spinner.Tick,
|
||||
runPretendProcess,
|
||||
)
|
||||
}
|
||||
@@ -128,12 +126,12 @@ type processFinishedMsg time.Duration
|
||||
|
||||
// pretendProcess simulates a long-running process.
|
||||
func runPretendProcess() tea.Msg {
|
||||
pause := time.Duration(rand.Int63n(899)+100) * time.Millisecond
|
||||
pause := time.Duration(rand.Int63n(899)+100) * time.Millisecond // nolint:gosec
|
||||
time.Sleep(pause)
|
||||
return processFinishedMsg(pause)
|
||||
}
|
||||
|
||||
func randomEmoji() string {
|
||||
emojis := []rune("๐ฆ๐ง๐ก๐ค ๐พ๐ญ๐ฆ๐ฏ๐ฆ๐ฅจ๐๐๐๐ฅ๐ฎ๐ฆ๐ฆ๐ถ๐ธ๐๐ฅ๐งฒ๐๐ฅ๐๐ฝ")
|
||||
return string(emojis[rand.Intn(len(emojis))])
|
||||
return string(emojis[rand.Intn(len(emojis))]) // nolint:gosec
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user