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 {
59
59
if err != nil {
60
60
p .Debug (print .ErrorLevel , "get public IP: %v" , err )
61
61
publicIpLabel = model .PublicIpId
62
- }
63
- if publicIpLabel == "" {
62
+ } else if publicIpLabel == "" {
64
63
publicIpLabel = model .PublicIpId
65
64
}
66
65
Original file line number Diff line number Diff line change @@ -67,8 +67,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
67
67
if err != nil {
68
68
p .Debug (print .ErrorLevel , "get project name: %v" , err )
69
69
projectLabel = model .ProjectId
70
- }
71
- if projectLabel == "" {
70
+ } else if projectLabel == "" {
72
71
projectLabel = model .ProjectId
73
72
}
74
73
Original file line number Diff line number Diff line change @@ -57,8 +57,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
57
57
if err != nil {
58
58
p .Debug (print .ErrorLevel , "get public IP: %v" , err )
59
59
publicIpLabel = model .PublicIpId
60
- }
61
- if publicIpLabel == "" {
60
+ } else if publicIpLabel == "" {
62
61
publicIpLabel = model .PublicIpId
63
62
}
64
63
Original file line number Diff line number Diff line change @@ -55,8 +55,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
55
55
if err != nil {
56
56
p .Debug (print .ErrorLevel , "get public IP: %v" , err )
57
57
publicIpLabel = model .PublicIpId
58
- }
59
- if publicIpLabel == "" {
58
+ } else if publicIpLabel == "" {
60
59
publicIpLabel = model .PublicIpId
61
60
}
62
61
Original file line number Diff line number Diff line change @@ -81,8 +81,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
81
81
if err != nil {
82
82
p .Debug (print .ErrorLevel , "get project name: %v" , err )
83
83
projectLabel = model .ProjectId
84
- }
85
- if projectLabel == "" {
84
+ } else if projectLabel == "" {
86
85
projectLabel = model .ProjectId
87
86
}
88
87
p .Info ("No public IPs found for project %q\n " , projectLabel )
You can’t perform that action at this time.
0 commit comments