simpler console command interface

This commit is contained in:
Radu Ioan Fericean
2015-07-14 21:23:21 +03:00
parent 0f7cc579f3
commit e95b2be88d
49 changed files with 131 additions and 230 deletions

View File

@@ -30,7 +30,7 @@ func init() {
type CmdStatus struct {
name string
rpcMethod string
rpcParams *StringWrapper
rpcParams *EmptyWrapper
*CommandExecuter
}
@@ -42,14 +42,11 @@ func (self *CmdStatus) RpcMethod() string {
return self.rpcMethod
}
func (self *CmdStatus) RpcParams(ptr, reset bool) interface{} {
func (self *CmdStatus) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &StringWrapper{}
self.rpcParams = &EmptyWrapper{}
}
if ptr {
return self.rpcParams
}
return *self.rpcParams
return self.rpcParams
}
func (self *CmdStatus) PostprocessRpcParams() error {