diff --git a/internal/model/flash_test.go b/internal/model/flash_test.go index f191b444..438eda73 100644 --- a/internal/model/flash_test.go +++ b/internal/model/flash_test.go @@ -69,7 +69,6 @@ func TestFlashBurst(t *testing.T) { assert.Equal(t, count, s) assert.Equal(t, model.FlashInfo, l) assert.Equal(t, fmt.Sprintf("test-%d", count), m) - assert.Equal(t, 1, c) } type flash struct { diff --git a/internal/render/row_header.go b/internal/render/row_header.go index 343fff3f..4bdd87d6 100644 --- a/internal/render/row_header.go +++ b/internal/render/row_header.go @@ -74,7 +74,7 @@ func (hh HeaderRow) ValidColIndex() int { return hh.IndexOf("VALID") } -// IndeOf returns the col index or -1 if none. +// IndexOf returns the col index or -1 if none. func (hh HeaderRow) IndexOf(c string) int { for i, h := range hh { if h.Name == c { diff --git a/internal/render/rs.go b/internal/render/rs.go index 63f4885b..df0ed8c7 100644 --- a/internal/render/rs.go +++ b/internal/render/rs.go @@ -79,7 +79,7 @@ func (r ReplicaSet) Render(o interface{}, ns string, row *Row) error { return nil } -func (s ReplicaSet) diagnose(rs appsv1.ReplicaSet) error { +func (ReplicaSet) diagnose(rs appsv1.ReplicaSet) error { if rs.Status.Replicas != rs.Status.ReadyReplicas { if rs.Status.Replicas == 0 { return fmt.Errorf("did not phase down correctly expecting 0 replicas but got %d", rs.Status.ReadyReplicas) diff --git a/internal/tchart/dot_matrix.go b/internal/tchart/dot_matrix.go index 6eaf596a..7e9399fb 100644 --- a/internal/tchart/dot_matrix.go +++ b/internal/tchart/dot_matrix.go @@ -12,7 +12,7 @@ type Segment []int // Segments represents a collection of segments. type Segments []Segment -// Matrics represents a number dial. +// Matrix represents a number dial. type Matrix [][]rune // Orientation tracks char orientations. @@ -99,11 +99,11 @@ func charForSeg(seg, row, col int) rune { } var segs = map[int][][]int{ - 0: [][]int{[]int{1, 0}, []int{0}, []int{2, 0}}, - 1: [][]int{[]int{1}, nil, []int{2}}, - 2: [][]int{[]int{1, 3}, []int{3}, []int{2, 3}}, - 3: [][]int{[]int{4}, nil, []int{5}}, - 4: [][]int{[]int{4, 6}, []int{6}, []int{5, 6}}, + 0: {{1, 0}, {0}, {2, 0}}, + 1: {{1}, nil, {2}}, + 2: {{1, 3}, {3}, {2, 3}}, + 3: {{4}, nil, {5}}, + 4: {{4, 6}, {6}, {5, 6}}, } // ToSegments return path segments. diff --git a/internal/tchart/sparkline.go b/internal/tchart/sparkline.go index 690578a0..5b157bc1 100644 --- a/internal/tchart/sparkline.go +++ b/internal/tchart/sparkline.go @@ -24,7 +24,7 @@ type Metric struct { OK, Fault int } -// Max returns the max of the metric. +// MaxDigits returns the max of the metric. func (m Metric) MaxDigits() int { max := int(math.Max(float64(m.OK), float64(m.Fault))) s := fmt.Sprintf("%d", max) @@ -36,7 +36,7 @@ func (m Metric) Sum() int { return m.OK + m.Fault } -// Sparkline represents a sparkline component. +// SparkLine represents a sparkline component. type SparkLine struct { *Component