Skip to content

Commit a71a1b6

Browse files
authored
Format prompt test for dns zone commands (#423)
* add quotes around zone name * update docs
1 parent 76606ad commit a71a1b6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/stackit_dns_zone_clone.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ stackit dns zone clone [flags]
1616
Clones a DNS zone with ID "xxx" to a new zone with DNS name "www.my-zone.com"
1717
$ stackit dns zone clone xxx --dns-name www.my-zone.com
1818
19-
Clones a DNS zone with ID "xxx" to a new zone with DNS name "www.my-zone.com" and adjust records "true"
20-
$ stackit dns zone clone xxx --dns-name www.my-zone.com --adjust-records
21-
2219
Clones a DNS zone with ID "xxx" to a new zone with DNS name "www.my-zone.com" and display name "new-zone"
2320
$ stackit dns zone clone xxx --dns-name www.my-zone.com --name new-zone
21+
22+
Clones a DNS zone with ID "xxx" to a new zone with DNS name "www.my-zone.com" and adjust records "true"
23+
$ stackit dns zone clone xxx --dns-name www.my-zone.com --adjust-records
2424
```
2525

2626
### Options

internal/cmd/dns/zone/clone/clone.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
7676
}
7777

7878
if !model.AssumeYes {
79-
prompt := fmt.Sprintf("Are you sure you want to clone the zone %s?", zoneLabel)
79+
prompt := fmt.Sprintf("Are you sure you want to clone the zone %q?", zoneLabel)
8080
err = p.PromptForConfirmation(prompt)
8181
if err != nil {
8282
return err

internal/cmd/dns/zone/delete/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
5858
zoneLabel = model.ZoneId
5959
}
6060
if !model.AssumeYes {
61-
prompt := fmt.Sprintf("Are you sure you want to delete zone %s? (This cannot be undone)", zoneLabel)
61+
prompt := fmt.Sprintf("Are you sure you want to delete zone %q? (This cannot be undone)", zoneLabel)
6262
err = p.PromptForConfirmation(prompt)
6363
if err != nil {
6464
return err

0 commit comments

Comments
 (0)