Skip to content

Commit

Permalink
fix: renamed command new to wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
oversize committed May 22, 2024
1 parent 197912e commit adcc1d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmd/bursa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func main() {
}

rootCmd.AddCommand(
newCommand(),
walletCommand(),
apiCommand(),
)

Expand Down
23 changes: 12 additions & 11 deletions cmd/bursa/new.go → cmd/bursa/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,28 @@ var (
output string
)

func newCommand() *cobra.Command {
newCommand := &cobra.Command{
Use: "new",
func walletCommand() *cobra.Command {
walletCommand := cobra.Command{
Use: "wallet",
Short: "Wallet commands",
}

newCommand.AddCommand(
newWalletCommand(),
walletCommand.AddCommand(
walletCreateCommand(),
)
return newCommand
return &walletCommand
}

func newWalletCommand() *cobra.Command {
newWalletCommand := cobra.Command{
Use: "wallet",
func walletCreateCommand() *cobra.Command {
walletCreateCommand := cobra.Command{
Use: "create",
Short: "Creates a new wallet",
Run: func(cmd *cobra.Command, args []string) {
cli.Run(output)
},
}

newWalletCommand.PersistentFlags().StringVar(&output, "output", "", "")
walletCreateCommand.PersistentFlags().StringVar(&output, "output", "", "")

return &newWalletCommand
return &walletCreateCommand
}

0 comments on commit adcc1d9

Please sign in to comment.