示例#1
0
//注册命令
func (s *Skeleton) RegisterCommand(name string, help string, f interface{}) {
	console.Register(name, help, f, s.commandServer) //调用控制台的注册功能
	//实际上是将函数注册进s.commandServer,但是控制台也需要注册命令,以向s.commandServer发起rpc调用
}
示例#2
0
func (s *Skeleton) RegisterCommand(name string, help string, f interface{}) {
	console.Register(name, help, f, s.commandServer)
}