Skip to content

Commit 8a0051c

Browse files
committed
item: rename receiver variables consistently
1 parent 6a6235e commit 8a0051c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

sizes/output.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,30 +141,30 @@ func newItem(
141141
}
142142
}
143143

144-
func (l *item) Emit(t *table) {
145-
levelOfConcern, interesting := l.levelOfConcern(t.threshold)
144+
func (i *item) Emit(t *table) {
145+
levelOfConcern, interesting := i.levelOfConcern(t.threshold)
146146
if !interesting {
147147
return
148148
}
149-
valueString, unitString := l.humaner.Format(l.value, l.unit)
149+
valueString, unitString := i.humaner.Format(i.value, i.unit)
150150
t.formatRow(
151-
l.name, t.footnotes.CreateCitation(l.Footnote(t.nameStyle)),
151+
i.name, t.footnotes.CreateCitation(i.Footnote(t.nameStyle)),
152152
valueString, unitString,
153153
levelOfConcern,
154154
)
155155
}
156156

157-
func (l *item) Footnote(nameStyle NameStyle) string {
158-
if l.path == nil || l.path.OID == git.NullOID {
157+
func (i *item) Footnote(nameStyle NameStyle) string {
158+
if i.path == nil || i.path.OID == git.NullOID {
159159
return ""
160160
}
161161
switch nameStyle {
162162
case NameStyleNone:
163163
return ""
164164
case NameStyleHash:
165-
return l.path.OID.String()
165+
return i.path.OID.String()
166166
case NameStyleFull:
167-
return l.path.String()
167+
return i.path.String()
168168
default:
169169
panic("unexpected NameStyle")
170170
}
@@ -173,12 +173,12 @@ func (l *item) Footnote(nameStyle NameStyle) string {
173173
// If this item's alert level is at least as high as the threshold,
174174
// return the string that should be used as its "level of concern" and
175175
// `true`; otherwise, return `"", false`.
176-
func (l *item) levelOfConcern(threshold Threshold) (string, bool) {
177-
value, overflow := l.value.ToUint64()
176+
func (i *item) levelOfConcern(threshold Threshold) (string, bool) {
177+
value, overflow := i.value.ToUint64()
178178
if overflow {
179179
return "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", true
180180
}
181-
alert := Threshold(float64(value) / l.scale)
181+
alert := Threshold(float64(value) / i.scale)
182182
if alert < threshold {
183183
return "", false
184184
}

0 commit comments

Comments
 (0)