@@ -56,7 +56,7 @@ func (o Options) Run() error {
56
56
if err != nil {
57
57
return fmt .Errorf ("invalid data provided" )
58
58
}
59
- var columns = make ([]table.Column , 0 , len (columnNames ))
59
+ columns : = make ([]table.Column , 0 , len (columnNames ))
60
60
61
61
for i , title := range columnNames {
62
62
width := lipgloss .Width (title )
@@ -77,7 +77,7 @@ func (o Options) Run() error {
77
77
Selected : o .SelectedStyle .ToLipgloss (),
78
78
}
79
79
80
- var rows = make ([]table.Row , 0 , len (data ))
80
+ rows : = make ([]table.Row , 0 , len (data ))
81
81
for _ , row := range data {
82
82
if len (row ) > len (columns ) {
83
83
return fmt .Errorf ("invalid number of columns" )
@@ -91,7 +91,7 @@ func (o Options) Run() error {
91
91
Rows (data ... ).
92
92
BorderStyle (o .BorderStyle .ToLipgloss ()).
93
93
Border (style .Border [o .Border ]).
94
- StyleFunc (func (row , col int ) lipgloss.Style {
94
+ StyleFunc (func (row , _ int ) lipgloss.Style {
95
95
if row == 0 {
96
96
return styles .Header
97
97
}
@@ -111,7 +111,6 @@ func (o Options) Run() error {
111
111
)
112
112
113
113
tm , err := tea .NewProgram (model {table : table }, tea .WithOutput (os .Stderr )).Run ()
114
-
115
114
if err != nil {
116
115
return fmt .Errorf ("failed to start tea program: %w" , err )
117
116
}
0 commit comments