@ -58,7 +58,7 @@ var RootCmd = &cobra.Command{
PersistentPreRunE : func ( cmd * cobra . Command , args [ ] string ) error {
PersistentPreRunE : func ( cmd * cobra . Command , args [ ] string ) error {
switch cmd . Use {
switch cmd . Use {
case "counter" , "kvstore" , "dummy" : // for the examples apps, don't pre-run
case "counter" , "kvstore" : // for the examples apps, don't pre-run
return nil
return nil
case "version" : // skip running for version command
case "version" : // skip running for version command
return nil
return nil
@ -127,10 +127,6 @@ func addCounterFlags() {
counterCmd . PersistentFlags ( ) . BoolVarP ( & flagSerial , "serial" , "" , false , "enforce incrementing (serial) transactions" )
counterCmd . PersistentFlags ( ) . BoolVarP ( & flagSerial , "serial" , "" , false , "enforce incrementing (serial) transactions" )
}
}
func addDummyFlags ( ) {
dummyCmd . PersistentFlags ( ) . StringVarP ( & flagPersist , "persist" , "" , "" , "directory to use for a database" )
}
func addKVStoreFlags ( ) {
func addKVStoreFlags ( ) {
kvstoreCmd . PersistentFlags ( ) . StringVarP ( & flagPersist , "persist" , "" , "" , "directory to use for a database" )
kvstoreCmd . PersistentFlags ( ) . StringVarP ( & flagPersist , "persist" , "" , "" , "directory to use for a database" )
}
}
@ -152,10 +148,6 @@ func addCommands() {
// examples
// examples
addCounterFlags ( )
addCounterFlags ( )
RootCmd . AddCommand ( counterCmd )
RootCmd . AddCommand ( counterCmd )
// deprecated, left for backwards compatibility
addDummyFlags ( )
RootCmd . AddCommand ( dummyCmd )
// replaces dummy, see issue #196
addKVStoreFlags ( )
addKVStoreFlags ( )
RootCmd . AddCommand ( kvstoreCmd )
RootCmd . AddCommand ( kvstoreCmd )
}
}
@ -291,18 +283,6 @@ var counterCmd = &cobra.Command{
} ,
} ,
}
}
// deprecated, left for backwards compatibility
var dummyCmd = & cobra . Command {
Use : "dummy" ,
Deprecated : "use: [abci-cli kvstore] instead" ,
Short : "ABCI demo example" ,
Long : "ABCI demo example" ,
Args : cobra . ExactArgs ( 0 ) ,
RunE : func ( cmd * cobra . Command , args [ ] string ) error {
return cmdKVStore ( cmd , args )
} ,
}
var kvstoreCmd = & cobra . Command {
var kvstoreCmd = & cobra . Command {
Use : "kvstore" ,
Use : "kvstore" ,
Short : "ABCI demo example" ,
Short : "ABCI demo example" ,