mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-26 23:06:03 +03:00
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"
|
||
|
}
|