Skip to content

Commit 7ce362b

Browse files
committed
use panic-proof type conversion
1 parent d70ba23 commit 7ce362b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/cli/multiregion/dns.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,12 @@ func (d *DnsCommand) getAlbDnsValuesFromTfc(workspaceName string) (values AlbDns
204204
}
205205

206206
for _, item := range outputs.Items {
207+
itemValue, _ := item.Value.(string)
207208
switch item.Name {
208209
case "alb_dns_name":
209-
values.external = item.Value.(string)
210+
external = itemValue
210211
case "internal_alb_dns_name":
211-
values.internal = item.Value.(string)
212+
internal = itemValue
212213
}
213214
}
214215
return

0 commit comments

Comments
 (0)