File tree Expand file tree Collapse file tree 5 files changed +5
-10
lines changed
internal/cmd/beta/public-ip Expand file tree Collapse file tree 5 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
5959 if err != nil {
6060 p .Debug (print .ErrorLevel , "get public IP: %v" , err )
6161 publicIpLabel = model .PublicIpId
62- }
63- if publicIpLabel == "" {
62+ } else if publicIpLabel == "" {
6463 publicIpLabel = model .PublicIpId
6564 }
6665
Original file line number Diff line number Diff line change @@ -67,8 +67,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
6767 if err != nil {
6868 p .Debug (print .ErrorLevel , "get project name: %v" , err )
6969 projectLabel = model .ProjectId
70- }
71- if projectLabel == "" {
70+ } else if projectLabel == "" {
7271 projectLabel = model .ProjectId
7372 }
7473
Original file line number Diff line number Diff line change @@ -57,8 +57,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
5757 if err != nil {
5858 p .Debug (print .ErrorLevel , "get public IP: %v" , err )
5959 publicIpLabel = model .PublicIpId
60- }
61- if publicIpLabel == "" {
60+ } else if publicIpLabel == "" {
6261 publicIpLabel = model .PublicIpId
6362 }
6463
Original file line number Diff line number Diff line change @@ -55,8 +55,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
5555 if err != nil {
5656 p .Debug (print .ErrorLevel , "get public IP: %v" , err )
5757 publicIpLabel = model .PublicIpId
58- }
59- if publicIpLabel == "" {
58+ } else if publicIpLabel == "" {
6059 publicIpLabel = model .PublicIpId
6160 }
6261
Original file line number Diff line number Diff line change @@ -81,8 +81,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
8181 if err != nil {
8282 p .Debug (print .ErrorLevel , "get project name: %v" , err )
8383 projectLabel = model .ProjectId
84- }
85- if projectLabel == "" {
84+ } else if projectLabel == "" {
8685 projectLabel = model .ProjectId
8786 }
8887 p .Info ("No public IPs found for project %q\n " , projectLabel )
You can’t perform that action at this time.
0 commit comments