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

@@ -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
}