Skip to content

Commit

Permalink
fix: small changes and linter fixes
Browse files Browse the repository at this point in the history
Signed-off-by: imneov <grantliu@yunify.com>
  • Loading branch information
imneov committed Mar 10, 2022
1 parent 028c0b9 commit 67a8ea7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kubernetes/portforward.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ func (pf *PortForward) Init() error {
case <-pf.ReadyCh:
ports, err := fw.GetPorts()
if err != nil {
return fmt.Errorf("can't get the ports that were forwarded: %w", err)
return fmt.Errorf("can not get the local and remote ports: %w", err)
}
if len(ports) == 0 {
return fmt.Errorf("can not get the ports that were forwarded: error getting ports length")
return fmt.Errorf("can not get the local and remote ports: error getting ports length")
}

pf.LocalPort = int(ports[0].Local)
Expand Down

0 comments on commit 67a8ea7

Please sign in to comment.