Skip to content

Commit eac12a8

Browse files
committed
output.go: dispense with special cases early
1 parent 8a0051c commit eac12a8

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

sizes/output.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -248,17 +248,17 @@ type Threshold float64
248248
func (t *Threshold) String() string {
249249
if t == nil {
250250
return "UNSET"
251-
} else {
252-
switch *t {
253-
case 0:
254-
return "--verbose"
255-
case 1:
256-
return "--threshold=1"
257-
case 30:
258-
return "--critical"
259-
default:
260-
return fmt.Sprintf("--threshold=%g", *t)
261-
}
251+
}
252+
253+
switch *t {
254+
case 0:
255+
return "--verbose"
256+
case 1:
257+
return "--threshold=1"
258+
case 30:
259+
return "--critical"
260+
default:
261+
return fmt.Sprintf("--threshold=%g", *t)
262262
}
263263
}
264264

@@ -328,17 +328,17 @@ const (
328328
func (n *NameStyle) String() string {
329329
if n == nil {
330330
return "UNSET"
331-
} else {
332-
switch *n {
333-
case NameStyleNone:
334-
return "none"
335-
case NameStyleHash:
336-
return "hash"
337-
case NameStyleFull:
338-
return "full"
339-
default:
340-
panic("Unexpected NameStyle value")
341-
}
331+
}
332+
333+
switch *n {
334+
case NameStyleNone:
335+
return "none"
336+
case NameStyleHash:
337+
return "hash"
338+
case NameStyleFull:
339+
return "full"
340+
default:
341+
panic("Unexpected NameStyle value")
342342
}
343343
}
344344

0 commit comments

Comments
 (0)