From 849b52c1655df7450f5bfee294667d9d01d83767 Mon Sep 17 00:00:00 2001 From: Kushal Kumar Date: Wed, 23 Nov 2022 21:11:00 +0530 Subject: [PATCH] fix: consistent CLI commands naming lower-hypehanted for commands Signed-off-by: Kushal Kumar --- cmd/addcurator.go | 3 ++- cmd/challengepool.go | 1 + cmd/createdir.go | 3 ++- cmd/fileRefs.go | 1 + cmd/filemeta.go | 1 + cmd/finalizeallocation.go | 2 ++ cmd/getallocation.go | 1 + cmd/listallocations.go | 3 ++- cmd/newallocation.go | 3 ++- cmd/removecurator.go | 3 ++- cmd/transferallocation.go | 3 ++- cmd/updateallocation.go | 3 ++- cmd/walletinfo.go | 3 ++- 13 files changed, 22 insertions(+), 8 deletions(-) diff --git a/cmd/addcurator.go b/cmd/addcurator.go index fd7b2d39..8d783385 100644 --- a/cmd/addcurator.go +++ b/cmd/addcurator.go @@ -8,7 +8,8 @@ import ( ) var addCuratorCmd = &cobra.Command{ - Use: "addcurator", + Use: "add-curator", + Aliases: []string{"addcurator"}, Short: "Adds a curator to an allocation", Long: "Adds a curator to an allocation", Args: cobra.MinimumNArgs(0), diff --git a/cmd/challengepool.go b/cmd/challengepool.go index d0756cf2..1307136c 100644 --- a/cmd/challengepool.go +++ b/cmd/challengepool.go @@ -28,6 +28,7 @@ func printChallengePoolInfo(info *sdk.ChallengePoolInfo) { // cpInfo information var cpInfo = &cobra.Command{ Use: "cp-info", + Aliases: []string {"challenge-pool"}, Short: "Challenge pool information.", Long: `Challenge pool information.`, Args: cobra.MinimumNArgs(0), diff --git a/cmd/createdir.go b/cmd/createdir.go index 2decc0a9..2e7cd4e5 100644 --- a/cmd/createdir.go +++ b/cmd/createdir.go @@ -9,7 +9,8 @@ import ( ) var createDirCmd = &cobra.Command{ - Use: "createdir", + Use: "create-dir", + Aliases: []string {"createdir"}, Short: "Create directory", Long: `Create directory`, Args: cobra.MinimumNArgs(0), diff --git a/cmd/fileRefs.go b/cmd/fileRefs.go index 5dbc181d..2a2c5347 100644 --- a/cmd/fileRefs.go +++ b/cmd/fileRefs.go @@ -26,6 +26,7 @@ func checkError(err error) { var fileRefsCmd = &cobra.Command{ Use: "recent-refs", + Aliases: []string{"file-refs"}, Short: "get list of recently added refs", Long: `get list of recently added refs`, Args: cobra.MinimumNArgs(0), diff --git a/cmd/filemeta.go b/cmd/filemeta.go index 9dd2dded..47186c7b 100644 --- a/cmd/filemeta.go +++ b/cmd/filemeta.go @@ -13,6 +13,7 @@ import ( // filemetaCmd represents file meta command var filemetaCmd = &cobra.Command{ Use: "meta", + Aliases: []string{"file-meta"}, Short: "get meta data of files from blobbers", Long: `get meta data of files from blobbers`, Args: cobra.MinimumNArgs(0), diff --git a/cmd/finalizeallocation.go b/cmd/finalizeallocation.go index be16f54b..634d618e 100644 --- a/cmd/finalizeallocation.go +++ b/cmd/finalizeallocation.go @@ -29,6 +29,7 @@ func allocShouldNotBeFinalized(allocID string) { // finiAllocationCmd used to change allocation size and expiration var finiAllocationCmd = &cobra.Command{ Use: "alloc-fini", + Aliases: []string{"fini-allocation"}, Short: "Finalize an expired allocation", Long: `Finalize an expired allocation by allocation owner or one of blobbers of the allocation. It moves all tokens have to be moved between pools @@ -65,6 +66,7 @@ and empties write pool moving left tokens to client.`, // doesn't provides their service in reality var cancelAllocationCmd = &cobra.Command{ Use: "alloc-cancel", + Aliases: []string{"cancel-allocation"}, Short: "Cancel an allocation", Long: `Cancel allocation used to terminate an allocation where, because of blobbers, it can't be used. Thus, the blobbers will not receive their diff --git a/cmd/getallocation.go b/cmd/getallocation.go index 328f8bc3..106c1c17 100644 --- a/cmd/getallocation.go +++ b/cmd/getallocation.go @@ -37,6 +37,7 @@ func uploadCostFor1GB(alloc *sdk.Allocation) (cost common.Balance) { // getallocationCmd represents the get allocation info command var getallocationCmd = &cobra.Command{ Use: "get", + Aliases: []string{"get-allocation"}, Short: "Gets the allocation info", Long: `Gets the allocation info`, Args: cobra.MinimumNArgs(0), diff --git a/cmd/listallocations.go b/cmd/listallocations.go index 8f2bfbd2..687a550f 100644 --- a/cmd/listallocations.go +++ b/cmd/listallocations.go @@ -13,7 +13,8 @@ import ( ) var listallocationsCmd = &cobra.Command{ - Use: "listallocations", + Use: "list-allocations", + Aliases: []string{"listallocations"}, Short: "List allocations for the client", Long: `List allocations for the client`, Run: func(cmd *cobra.Command, args []string) { diff --git a/cmd/newallocation.go b/cmd/newallocation.go index 6e18baaf..d532be91 100644 --- a/cmd/newallocation.go +++ b/cmd/newallocation.go @@ -47,7 +47,8 @@ func getPriceRange(val string) (pr sdk.PriceRange, err error) { // newallocationCmd represents the new allocation command var newallocationCmd = &cobra.Command{ - Use: "newallocation", + Use: "new-allocation", + Aliases:[]string{"newallocation"}, Short: "Creates a new allocation", Long: `Creates a new allocation`, Args: cobra.MinimumNArgs(0), diff --git a/cmd/removecurator.go b/cmd/removecurator.go index ce2df98d..123e8805 100644 --- a/cmd/removecurator.go +++ b/cmd/removecurator.go @@ -8,7 +8,8 @@ import ( ) var removeCuratorCmd = &cobra.Command{ - Use: "removecurator", + Use: "remove-curator", + Aliases:[]string{"removecurator"}, Short: "Removes a curator from an allocation", Long: "Removes a curator from an allocation", Args: cobra.MinimumNArgs(0), diff --git a/cmd/transferallocation.go b/cmd/transferallocation.go index 03f25303..6f71e6e8 100644 --- a/cmd/transferallocation.go +++ b/cmd/transferallocation.go @@ -8,7 +8,8 @@ import ( ) var transferAllocationCmd = &cobra.Command{ - Use: "transferallocation", + Use: "transfer-allocation", + Aliases:[]string{"transferallocation"}, Short: "Transfer an allocation between owners", Long: "Transfer an allocation between owners, only a curator can transfer an allocation", Args: cobra.MinimumNArgs(0), diff --git a/cmd/updateallocation.go b/cmd/updateallocation.go index 5bdd123c..7b63213f 100644 --- a/cmd/updateallocation.go +++ b/cmd/updateallocation.go @@ -11,7 +11,8 @@ import ( // updateAllocationCmd used to change allocation size and expiration var updateAllocationCmd = &cobra.Command{ - Use: "updateallocation", + Use: "update-allocation", + Aliases: []string{"updateallocation"}, Short: "Updates allocation's expiry and size", Long: `Updates allocation's expiry and size`, Args: cobra.MinimumNArgs(0), diff --git a/cmd/walletinfo.go b/cmd/walletinfo.go index b0c8d3d9..a69acd88 100644 --- a/cmd/walletinfo.go +++ b/cmd/walletinfo.go @@ -34,7 +34,8 @@ var walletDecryptCmd = &cobra.Command{ // walletinfo used for getting the wallet info var walletinfoCmd = &cobra.Command{ - Use: "getwallet", + Use: "get-wallet", + Aliases: []string {"getwallet"}, Short: "Get wallet information", Long: `Get wallet information`, Args: cobra.MinimumNArgs(0),