mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-29 00:25:20 +03:00
b97231eecb
Signed-off-by: Bruce <weichou1229@gmail.com>
18 lines
238 B
Go
18 lines
238 B
Go
package codecoverage
|
|
|
|
func Size(a int) string {
|
|
switch {
|
|
case a < 0:
|
|
return "negative"
|
|
case a == 0:
|
|
return "zero"
|
|
case a < 10:
|
|
return "small"
|
|
case a < 100:
|
|
return "big"
|
|
case a < 1000:
|
|
return "huge"
|
|
}
|
|
return "enormous"
|
|
}
|