From 9944ce37c540e708a30319a77ec8f6424781133b Mon Sep 17 00:00:00 2001 From: Brian Boucheron Date: Wed, 4 Mar 2026 13:16:58 -0500 Subject: [PATCH] fix some inconsistent doctl examples --- commands/byoip_prefix.go | 2 +- commands/partner_network_connect.go | 2 +- commands/security.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/byoip_prefix.go b/commands/byoip_prefix.go index 61ceae816..16c941a56 100644 --- a/commands/byoip_prefix.go +++ b/commands/byoip_prefix.go @@ -63,7 +63,7 @@ BYOIP Prefixes can be held in the region they were created in on your account.`, cmdRunBYOIPPrefixResourcesList := CmdBuilder(cmd, RunBYOIPPrefixResourcesGet, "resource", "List all the Resource for a BYOIP Prefix", "Retrieves a list of all the Resources in your prefix.", Writer, aliasOpt("resources"), displayerType(&displayers.BYOIPPrefixResource{})) - cmdRunBYOIPPrefixResourcesList.Example = `The following example lists all resources in a byoip prefix: doctl network byoip-prefix resources 5ae545c4-0ac4-42bb-9de5-8eca3d17f1c0` + cmdRunBYOIPPrefixResourcesList.Example = `The following example lists all resources in a byoip prefix: doctl network byoip-prefix resource 5ae545c4-0ac4-42bb-9de5-8eca3d17f1c0` return cmd } diff --git a/commands/partner_network_connect.go b/commands/partner_network_connect.go index 68bccc07f..36015ace0 100644 --- a/commands/partner_network_connect.go +++ b/commands/partner_network_connect.go @@ -72,7 +72,7 @@ With the Partner Attachment commands, you can get, list, create, update, or dele AddStringFlag(cmdPartnerAttachmentCreate, doctl.ArgPartnerAttachmentBGPAuthKey, "", "", "BGP Auth Key") AddStringFlag(cmdPartnerAttachmentCreate, doctl.ArgPartnerAttachmentRedundancyZone, "", "", "Redundancy Zone (optional)") AddStringFlag(cmdPartnerAttachmentCreate, doctl.ArgPartnerAttachmentParentUUID, "", "", "HA Parent UUID (optional)") - cmdPartnerAttachmentCreate.Example = `The following example creates a Partner Attachment: doctl network connect create --name "example-pia" --connection-bandwidth-in-mbps 50 --naas-provider "MEGAPORT" --region "nyc" --vpc-ids "c5537207-ebf0-47cb-bc10-6fac717cd672"` + cmdPartnerAttachmentCreate.Example = `The following example creates a Partner Attachment: doctl network attachment create --name "example-pia" --connection-bandwidth-in-mbps 50 --naas-provider "MEGAPORT" --region "nyc" --vpc-ids "c5537207-ebf0-47cb-bc10-6fac717cd672"` partnerAttachmentDetails := ` - The Partner Attachment ID diff --git a/commands/security.go b/commands/security.go index 754607f8c..a6d25c709 100644 --- a/commands/security.go +++ b/commands/security.go @@ -57,13 +57,13 @@ func SecurityScan() *Command { cmdScanCreate := CmdBuilder(cmd, RunCmdSecurityScanCreate, "create", "Create a CSPM scan", `Creates a new CSPM scan.`, Writer, aliasOpt("c"), displayerType(&displayers.SecurityScan{})) AddBoolFlag(cmdScanCreate, doctl.ArgCommandWait, "", false, "Boolean that specifies whether to wait for a scan to complete before returning control to the terminal") - cmdScanCreate.Example = `The following example creates a CSPM scan for all droplets: doctl security scan create` + cmdScanCreate.Example = `The following example creates a CSPM scan for all droplets: doctl security scans create` cmdScanGet := CmdBuilder(cmd, RunCmdSecurityScanGet, "get ", "Get a CSPM scan", `Retrieves a CSPM scan and its findings.`, Writer, aliasOpt("g"), displayerType(&displayers.SecurityScan{})) AddStringFlag(cmdScanGet, doctl.ArgSecurityScanFindingType, "", "", "Filter findings by type") AddStringFlag(cmdScanGet, doctl.ArgSecurityScanFindingSeverity, "", "", "Filter findings by severity") - cmdScanGet.Example = `The following example retrieves a CSPM scan with findings filtered by severity: doctl security scan get 497dcba3-ecbf-4587-a2dd-5eb0665e6880 --severity critical` + cmdScanGet.Example = `The following example retrieves a CSPM scan with findings filtered by severity: doctl security scans get 497dcba3-ecbf-4587-a2dd-5eb0665e6880 --severity critical` cmdScanLatest := CmdBuilder(cmd, RunCmdSecurityScanLatest, "latest", "Get the latest CSPM scan", `Retrieves the latest CSPM scan and its findings.`, Writer, displayerType(&displayers.SecurityScan{})) @@ -73,7 +73,7 @@ func SecurityScan() *Command { cmdScanList := CmdBuilder(cmd, RunCmdSecurityScanList, "list", "List CSPM scans", `Retrieves a list of CSPM scans.`, Writer, aliasOpt("ls"), displayerType(&displayers.SecurityScans{})) - cmdScanList.Example = `The following example lists all CSPM scans: doctl security scan list` + cmdScanList.Example = `The following example lists all CSPM scans: doctl security scans list` cmdScanFindingAffectedResources := CmdBuilder(cmd, RunCmdSecurityFindingAffectedResources, "affected-resources ", "List scan finding affected resources", `Retrieves the resources affected by the issue identified in a scan finding.`, Writer, displayerType(&displayers.SecurityAffectedResource{})) AddStringFlag(cmdScanFindingAffectedResources, doctl.ArgSecurityFindingUUID, "", "", "Finding UUID to show affected resources for", requiredOpt())