diff --git a/chain_commands.go b/chain_commands.go index fc6bdf0..1ecf3c9 100644 --- a/chain_commands.go +++ b/chain_commands.go @@ -39,7 +39,7 @@ func AddChainCommands(root *cobra.Command) { Use: "chain", Short: "Manage the Lethean blockchain node", Long: "Manage the Lethean blockchain node: sync and explore.", - Example: "chain explorer --data-dir ~/.lethean/chain\nchain sync --daemon\nchain sync --stop", + Example: "core-chain chain explorer --data-dir ~/.lethean/chain\ncore-chain chain sync --daemon\ncore-chain chain sync --stop", } chainCmd.PersistentFlags().StringVar(&dataDir, "data-dir", defaultChainDataDirPath(), "blockchain data directory") diff --git a/commands_test.go b/commands_test.go index dde49d2..04f44c9 100644 --- a/commands_test.go +++ b/commands_test.go @@ -22,7 +22,7 @@ func TestAddChainCommands_Good_RegistersParent(t *testing.T) { assert.Equal(t, "chain", chainCmd.Name()) assert.Equal(t, "Manage the Lethean blockchain node", chainCmd.Short) assert.Equal(t, "Manage the Lethean blockchain node: sync and explore.", chainCmd.Long) - assert.Equal(t, "chain explorer --data-dir ~/.lethean/chain\nchain sync --daemon\nchain sync --stop", chainCmd.Example) + assert.Equal(t, "core-chain chain explorer --data-dir ~/.lethean/chain\ncore-chain chain sync --daemon\ncore-chain chain sync --stop", chainCmd.Example) } func TestAddChainCommands_Good_HasSubcommands(t *testing.T) { @@ -60,7 +60,7 @@ func TestNewChainExplorerCommand_Good_Metadata(t *testing.T) { assert.Equal(t, "explorer", cmd.Use) assert.Equal(t, "Inspect blocks in a terminal UI", cmd.Short) assert.Equal(t, "Browse blocks and transactions in a terminal UI while the node syncs.", cmd.Long) - assert.Equal(t, "chain explorer --data-dir ~/.lethean/chain", cmd.Example) + assert.Equal(t, "core-chain chain explorer --data-dir ~/.lethean/chain", cmd.Example) assert.Equal(t, "Chain Explorer", chainExplorerFrameTitle) } @@ -74,5 +74,5 @@ func TestNewChainSyncCommand_Good_Metadata(t *testing.T) { assert.Equal(t, "sync", cmd.Use) assert.Equal(t, "Synchronise from P2P peers", cmd.Short) assert.Equal(t, "Synchronise the blockchain from P2P peers in foreground or daemon mode.", cmd.Long) - assert.Equal(t, "chain sync\nchain sync --daemon\nchain sync --stop", cmd.Example) + assert.Equal(t, "core-chain chain sync\ncore-chain chain sync --daemon\ncore-chain chain sync --stop", cmd.Example) } diff --git a/explorer_command.go b/explorer_command.go index de3f4e4..4706847 100644 --- a/explorer_command.go +++ b/explorer_command.go @@ -29,7 +29,7 @@ const chainExplorerFrameTitle = "Chain Explorer" // // Example: // -// chain explorer --data-dir ~/.lethean/chain +// core-chain chain explorer --data-dir ~/.lethean/chain // // Use it alongside `AddChainCommands` to expose the TUI node view. func newChainExplorerCommand(dataDir, seed *string, testnet *bool) *cobra.Command { @@ -37,7 +37,7 @@ func newChainExplorerCommand(dataDir, seed *string, testnet *bool) *cobra.Comman Use: "explorer", Short: "Inspect blocks in a terminal UI", Long: "Browse blocks and transactions in a terminal UI while the node syncs.", - Example: "chain explorer --data-dir ~/.lethean/chain", + Example: "core-chain chain explorer --data-dir ~/.lethean/chain", RunE: func(cmd *cobra.Command, args []string) error { return runChainExplorer(*dataDir, *seed, *testnet) }, diff --git a/sync_command.go b/sync_command.go index 83659d7..3f0bd3d 100644 --- a/sync_command.go +++ b/sync_command.go @@ -27,9 +27,9 @@ import ( // // Example: // -// chain sync -// chain sync --daemon -// chain sync --stop +// core-chain chain sync +// core-chain chain sync --daemon +// core-chain chain sync --stop // // It keeps the foreground and daemon modes behind a predictable command path. func newChainSyncCommand(dataDir, seed *string, testnet *bool) *cobra.Command { @@ -42,7 +42,7 @@ func newChainSyncCommand(dataDir, seed *string, testnet *bool) *cobra.Command { Use: "sync", Short: "Synchronise from P2P peers", Long: "Synchronise the blockchain from P2P peers in foreground or daemon mode.", - Example: "chain sync\nchain sync --daemon\nchain sync --stop", + Example: "core-chain chain sync\ncore-chain chain sync --daemon\ncore-chain chain sync --stop", RunE: func(cmd *cobra.Command, args []string) error { if stopDaemon { return stopChainSyncDaemon(*dataDir)