Skip to content

Commit

Permalink
fix: consistent CLI commands naming
Browse files Browse the repository at this point in the history
lower-hypehanted for commands

Signed-off-by: Kushal Kumar <[email protected]>
  • Loading branch information
K-Kumar-01 committed Nov 27, 2022
1 parent 8b23668 commit eb1f88e
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 8 deletions.
3 changes: 2 additions & 1 deletion cmd/addcurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions cmd/challengepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion cmd/createdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions cmd/fileRefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions cmd/filemeta.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 2 additions & 0 deletions cmd/finalizeallocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions cmd/getallocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion cmd/listallocations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion cmd/newallocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion cmd/removecurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion cmd/transferallocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion cmd/updateallocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion cmd/walletinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit eb1f88e

Please sign in to comment.