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
@@ -216,7 +216,7 @@ func chosenView(m model) string {
|
||||
label = fmt.Sprintf("Downloaded. Exiting in %s seconds...", colorFg(strconv.Itoa(m.Ticks), "79"))
|
||||
}
|
||||
|
||||
return msg + "\n\n" + label + "\n" + progressbar(80, m.Progress) + "%"
|
||||
return msg + "\n\n" + label + "\n" + progressbar(m.Progress) + "%"
|
||||
}
|
||||
|
||||
func checkbox(label string, checked bool) string {
|
||||
@@ -226,7 +226,7 @@ func checkbox(label string, checked bool) string {
|
||||
return fmt.Sprintf("[ ] %s", label)
|
||||
}
|
||||
|
||||
func progressbar(width int, percent float64) string {
|
||||
func progressbar(percent float64) string {
|
||||
w := float64(progressBarWidth)
|
||||
|
||||
fullSize := int(math.Round(w * percent))
|
||||
@@ -253,14 +253,6 @@ func makeFgStyle(color string) func(string) string {
|
||||
return termenv.Style{}.Foreground(term.Color(color)).Styled
|
||||
}
|
||||
|
||||
// Color a string's foreground and background with the given value.
|
||||
func makeFgBgStyle(fg, bg string) func(string) string {
|
||||
return termenv.Style{}.
|
||||
Foreground(term.Color(fg)).
|
||||
Background(term.Color(bg)).
|
||||
Styled
|
||||
}
|
||||
|
||||
// Generate a blend of colors.
|
||||
func makeRamp(colorA, colorB string, steps float64) (s []string) {
|
||||
cA, _ := colorful.Hex(colorA)
|
||||
|
||||
Reference in New Issue
Block a user