67}
68
69func empty(s string) bool {
70 if len(s) == 0 {71 return true
72 }
73 return false
Instead of conditionally checking for the value of a boolean expression and then
returning true
or false
, returning the expression itself simplifies the code
and improves readability.
if max > min {
return true
}
return false
return max > min