Skip to content

Commit a7c4bf0

Browse files
committed
docs(examples): improve a switch
1 parent 904e605 commit a7c4bf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/table/mindy/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ func main() {
3333
Rows(data...).
3434
StyleFunc(func(row, col int) lipgloss.Style {
3535
color := lipgloss.Color(fmt.Sprint(data[row][col-col%2]))
36-
switch {
37-
case col%2 == 0:
36+
switch col % 2 {
37+
case 0:
3838
return labelStyle.Foreground(color)
3939
default:
4040
return swatchStyle.Background(color)

0 commit comments

Comments
 (0)