Skip to content

Commit 62e4d81

Browse files
committed
levelOfConcern(): take a Threshold rather than a *table, argument
1 parent a747d45 commit 62e4d81

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sizes/output.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func newItem(
154154
}
155155

156156
func (l *item) Emit(t *table, buf io.Writer, indent int) {
157-
levelOfConcern, interesting := l.levelOfConcern(t)
157+
levelOfConcern, interesting := l.levelOfConcern(t.threshold)
158158
if !interesting {
159159
return
160160
}
@@ -187,9 +187,9 @@ func (l *item) Footnote(nameStyle NameStyle) string {
187187
// If this item's alert level is at least as high as the threshold,
188188
// return the string that should be used as its "level of concern" and
189189
// `true`; otherwise, return `"", false`.
190-
func (l *item) levelOfConcern(t *table) (string, bool) {
190+
func (l *item) levelOfConcern(threshold Threshold) (string, bool) {
191191
alert := Threshold(float64(l.value.ToUint64()) / l.scale)
192-
if alert < t.threshold {
192+
if alert < threshold {
193193
return "", false
194194
}
195195
if alert > 30 {

0 commit comments

Comments
 (0)