Skip to content

Commit 93270b9

Browse files
committed
use panic-proof type conversion
1 parent d292d43 commit 93270b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/cli/multiregion/dns.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ func (d *DnsCommand) getTfcOutputFromWorkspace(ctx context.Context, workspaceNam
267267

268268
for _, item := range outputs.Items {
269269
if item.Name == outputName {
270-
return item.Value.(string)
270+
if itemValue, ok := item.Value.(string); ok {
271+
return itemValue
272+
}
271273
}
272274
}
273275

0 commit comments

Comments
 (0)