cleaning up

mine
derailed 2020-02-20 10:26:45 -07:00
parent 73a90ed2ae
commit 134c394b6e
5 changed files with 10 additions and 11 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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)

View File

@ -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.

View File

@ -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