Closed alexandear closed 11 months ago
This PR refactors code by changing if len(str) == 0 { to more idiomatic if str == "" {. Additionally, enables gocritic's emptyStringTest check to prevent such code in the future.
if len(str) == 0 {
if str == "" {
emptyStringTest
See "Empty string check".
This PR refactors code by changing
if len(str) == 0 {
to more idiomaticif str == "" {
. Additionally, enables gocritic'semptyStringTest
check to prevent such code in the future.See "Empty string check".