Skip to content

Commit

Permalink
GetInitCmd takes app options
Browse files Browse the repository at this point in the history
  • Loading branch information
rigelrozanski authored and ebuchman committed Oct 12, 2017
1 parent 1785f54 commit f71c833
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/commands/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

var (
// InitCmd - node initialization command
InitCmd = GetInitCmd("mycoin")
InitCmd = GetInitCmd("mycoin", []string{})

//nolint - flags
FlagChainID = "chain-id" //TODO group with other flags or remove? is this already a flag here?
Expand All @@ -30,15 +30,15 @@ var (
)

// GetInitCmd - get the node initialization command, with a custom genesis account denom
func GetInitCmd(defaultDenom string) *cobra.Command {
func GetInitCmd(defaultDenom string, options []string) *cobra.Command {
initCmd := &cobra.Command{
Use: "init [address]",
Short: "Initialize genesis files for a blockchain",
RunE: initCmd,
}
initCmd.Flags().String(FlagChainID, "test_chain_id", "Chain ID")
initCmd.Flags().String(FlagDenom, defaultDenom, "Coin denomination for genesis account")
initCmd.Flags().StringSliceP(FlagOption, "p", []string{}, "Genesis option in the format <app>/<option>/<value>")
initCmd.Flags().StringSliceP(FlagOption, "p", options, "Genesis option in the format <app>/<option>/<value>")
initCmd.Flags().Bool(FlagStatic, false, "use a static private validator")
return initCmd
}
Expand Down

0 comments on commit f71c833

Please sign in to comment.