Skip to content

Commit

Permalink
add singular/plural aliases for all top-level commands
Browse files Browse the repository at this point in the history
  • Loading branch information
displague committed Jul 15, 2020
1 parent c10f0f4 commit 5129d52
Show file tree
Hide file tree
Showing 15 changed files with 56 additions and 42 deletions.
2 changes: 1 addition & 1 deletion cmd/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
// deviceCmd represents the device command
var deviceCmd = &cobra.Command{
Use: "device",
Aliases: []string{"server"},
Aliases: []string{"server", "servers", "devices"},
Short: "Device operations",
Long: `Device operations: create, delete, update, start/stop, reboot and get.`,
}
Expand Down
7 changes: 4 additions & 3 deletions cmd/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// eventsCmd represents the events command
var eventCmd = &cobra.Command{
Use: "event",
Short: "Events operations",
Long: `Events operations: get`,
Use: "event",
Aliases: []string{"events"},
Short: "Events operations",
Long: `Events operations: get`,
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/facility.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// facilityCmd represents the facility command
var facilityCmd = &cobra.Command{
Use: "facilities",
Short: "Facility operations",
Long: `Facility operations: get`,
Use: "facilities",
Aliases: []string{"facility"},
Short: "Facility operations",
Long: `Facility operations: get`,
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/hardware_reservations.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// hardwareReservationsCmd represents the hardwareReservations command
var hardwareReservationsCmd = &cobra.Command{
Use: "hardware-reservation",
Short: "Hardware reservation operations",
Long: `Hardware reservation operations: get, move`,
Use: "hardware-reservation",
Aliases: []string{"hardware-reservations"},
Short: "Hardware reservation operations",
Long: `Hardware reservation operations: get, move`,
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// ipCmd represents the ip command
var ipCmd = &cobra.Command{
Use: "ip",
Short: "IP operations",
Long: `IP address, reservations and assignment operations: assign, unassign, remove, available, request and get `,
Use: "ip",
Aliases: []string{"ips", "ip-addresses", "ip-address"},
Short: "IP operations",
Long: `IP address, reservations and assignment operations: assign, unassign, remove, available, request and get `,
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/operating_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// operatingSystemCmd represents the operatingSystem command
var operatingSystemCmd = &cobra.Command{
Use: "operating-systems",
Short: "Operating system operations",
Long: `Operating system operations: get`,
Use: "operating-systems",
Aliases: []string{"os"},
Short: "Operating system operations",
Long: `Operating system operations: get`,
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// organizationCmd represents the organization command
var organizationCmd = &cobra.Command{
Use: "organization",
Short: "Organization operations",
Long: `Organization operations: create, update, delete and get`,
Use: "organization",
Aliases: []string{"organizations", "org", "orgs"},
Short: "Organization operations",
Long: `Organization operations: create, update, delete and get`,
}

func init() {
Expand Down
5 changes: 3 additions & 2 deletions cmd/payment_methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ import (

// paymentMethodsCmd represents the paymentMethods command
var paymentMethodsCmd = &cobra.Command{
Use: "payment-methods",
Short: "Retrieves a list of payment methods for the organization",
Use: "payment-methods",
Aliases: []string{"payment-method"},
Short: "Retrieves a list of payment methods for the organization",
Long: `Example:
packet organization get payment-methods --id [organization_UUID]
Expand Down
7 changes: 4 additions & 3 deletions cmd/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// planCmd represents the plan command
var planCmd = &cobra.Command{
Use: "plan",
Short: "Plan operations",
Long: `Plan operations: get`,
Use: "plan",
Aliases: []string{"plans"},
Short: "Plan operations",
Long: `Plan operations: get`,
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// projectCmd represents the project command
var projectCmd = &cobra.Command{
Use: "project",
Short: "Project operations",
Long: `Project operations: create, delete, update and get`,
Use: "project",
Aliases: []string{"projects"},
Short: "Project operations",
Long: `Project operations: create, delete, update and get`,
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/twofa.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// 2faCmd represents the 2fa command
var twofaCmd = &cobra.Command{
Use: "2fa",
Short: "Two Factor Authentication operations",
Long: `Two Factor Authentication operations: enable, disable, receive`,
Use: "2fa",
Aliases: []string{"tfa", "mfa", "totp"},
Short: "Two Factor Authentication operations",
Long: `Two Factor Authentication operations: enable, disable, receive`,
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// userCmd represents the user command
var userCmd = &cobra.Command{
Use: "user",
Short: "User operations",
Long: `User operations: get`,
Use: "user",
Aliases: []string{"users"},
Short: "User operations",
Long: `User operations: get`,
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/virtual_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// virtualNetworkCmd represents the virtualNetwork command
var virtualNetworkCmd = &cobra.Command{
Use: "virtual-network",
Short: "Virtual network operations",
Long: `Virtual network operations: create, delete and get`,
Use: "virtual-network",
Aliases: []string{"vlan", "vlans"},
Short: "Virtual network operations",
Long: `Virtual network operations: create, delete and get`,
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// volumeCmd represents the volume command
var volumeCmd = &cobra.Command{
Use: "volume",
Short: "Volume operations",
Long: `Volume operations: create, delete, attach, detach and get`,
Use: "volume",
Aliases: []string{"volumes"},
Short: "Volume operations",
Long: `Volume operations: create, delete, attach, detach and get`,
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/vpn.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ import (

// enableVpnCmd represents the enableVpn command
var vpnCmd = &cobra.Command{
Use: "vpn",
Short: "VPN service operations",
Long: `VPN service operations: enable, disable, get`,
Use: "vpn",
Aliases: []string{"vpns"},
Short: "VPN service operations",
Long: `VPN service operations: enable, disable, get`,
}

func init() {
Expand Down

0 comments on commit 5129d52

Please sign in to comment.