diff options
author | Sam Whited <sam@samwhited.com> | 2022-02-28 11:20:57 -0500 |
---|---|---|
committer | Sam Whited <sam@samwhited.com> | 2022-02-28 15:00:05 -0500 |
commit | 41be84ad58cc4759c7f6261ff058f89582903747 (patch) | |
tree | fd45f7ddb658fbc5de67b1971913379737db07fb /pkg | |
parent | a8279ee5b809863733f44b7de204e43db42c35df (diff) |
[style] remove redundant nil/length check on slice
Nil slices are valid slices of length 0, so the nil check is not needed.
Signed-off-by: Sam Whited <sam@samwhited.com>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/vpn/bonafide/gateways.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/vpn/bonafide/gateways.go b/pkg/vpn/bonafide/gateways.go index 25ab027..f75e744 100644 --- a/pkg/vpn/bonafide/gateways.go +++ b/pkg/vpn/bonafide/gateways.go @@ -313,7 +313,7 @@ func (p *gatewayPool) getAll(transport string, tz int) ([]Gateway, error) { log.Println(">>> in getAll") log.Println("seems to be initialized...") - if p.recommended == nil || len(p.recommended) == 0 { + if len(p.recommended) == 0 { return p.getGatewaysFromMenshen(transport, 999) } log.Println(">>> by timezone") |