Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-kosu: make init a subcommand instead of a flag #191

Merged
merged 3 commits into from Jul 30, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

linting

  • Loading branch information
hrharder committed Jul 26, 2019
commit cff9a539048c644e9bfeb87af3d1bf433e04603b
@@ -112,7 +112,8 @@ func main() {
initCmd := &cobra.Command{
Use: "init",
Short: "Initialize a home directory and configuration",
Long: "Generates a Tendermint configuration directory and key pair for a Kosu node.\nThe default home directory is '$HOME/.kosu', which can be overridden with the '--home' flag.",
Long: "Generates a Tendermint configuration directory and key pair for a Kosu node.\n" +
"The default home directory is '$HOME/.kosu', which can be overridden with the '--home' flag.",
Run: func(cmd *cobra.Command, args []string) {
if err := abci.InitTendermint(cfg.Home); err != nil {
stdlog.Fatal(err)
@@ -122,7 +123,7 @@ func main() {

rootCmd.PersistentFlags().StringVarP(&cfg.Home, "home", "H", "~/.kosu", "directory for config and data")
rootCmd.PersistentFlags().BoolVarP(&cfg.Debug, "debug", "d", false, "enable debuging")
rootCmd.Flags().StringVarP(&cfg.Web3, "web3", "E", "ws://localhost:8546", "URL of a WebSocket Ethereum JSONRPC provider")
rootCmd.Flags().StringVarP(&cfg.Web3, "web3", "E", "ws://localhost:8546", "URL of an Ethereum JSONRPC provider")

rootCmd.AddCommand(rpc.NewCommand())
rootCmd.AddCommand(initCmd)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.