Maint: prefer empty string comparison

This commit is contained in:
Quentin McGaw (desktop)
2021-07-23 17:39:38 +00:00
parent 3c44214d01
commit b23eb8f29d
8 changed files with 10 additions and 11 deletions

View File

@@ -76,7 +76,7 @@ func (r *routing) DefaultIP() (ip net.IP, err error) {
defaultLinkName = link.Attrs().Name
}
}
if len(defaultLinkName) == 0 {
if defaultLinkName == "" {
return nil, fmt.Errorf("%w: in %d route(s)", ErrLinkDefaultNotFound, len(routes))
}