diff --git a/go.mod b/go.mod index b7171c5..6f8557c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/f1bonacc1/process-compose -go 1.22 +go 1.21 require ( dario.cat/mergo v1.0.0 diff --git a/src/tui/help-dialog.go b/src/tui/help-dialog.go index 348dc4d..cbac71c 100644 --- a/src/tui/help-dialog.go +++ b/src/tui/help-dialog.go @@ -39,8 +39,8 @@ func (hd *helpDialog) StylesChanged(s *config.Styles) { hd.closeButton.SetLabelColorActivated(s.Dialog().ButtonFgColor.Color()) hd.closeButton.SetBackgroundColorActivated(s.Dialog().ButtonBgColor.Color()) - for r := range hd.table.GetRowCount() { - for c := range hd.table.GetColumnCount() { + for r := 0; r < hd.table.GetRowCount(); r++ { + for c := 0; c < hd.table.GetColumnCount(); c++ { if c == 1 { hd.table.GetCell(r, c).SetTextColor(s.FgColor()) } else if c == 0 { diff --git a/src/tui/styles.go b/src/tui/styles.go index 05c64a0..941c393 100644 --- a/src/tui/styles.go +++ b/src/tui/styles.go @@ -23,7 +23,7 @@ func (pv *pcView) StylesChanged(s *config.Styles) { func (pv *pcView) setStatTableStyles(s *config.Styles) { pv.statTable.SetBackgroundColor(s.BgColor()) - for r := range pv.statTable.GetRowCount() { + for r := 0; r < pv.statTable.GetRowCount(); r++ { pv.statTable.GetCell(r, 0).SetTextColor(s.Style.StatTable.KeyFgColor.Color()) pv.statTable.GetCell(r, 1).SetTextColor(s.Style.StatTable.ValueFgColor.Color()) } @@ -32,8 +32,8 @@ func (pv *pcView) setStatTableStyles(s *config.Styles) { func (pv *pcView) setProcTableStyles(s *config.Styles) { pv.procTable.SetBackgroundColor(s.BgColor()) - for r := range pv.procTable.GetRowCount() { - for c := range pv.procTable.GetColumnCount() { + for r := 0; r < pv.procTable.GetRowCount(); r++ { + for c := 0; c < pv.procTable.GetColumnCount(); c++ { if r == 0 { pv.procTable.GetCell(r, c).SetTextColor(s.Style.ProcTable.HeaderFgColor.Color()) continue