code: func (d *Dispatcher) AddFunc(funcName string, f interface{}) {
  	sd, ok := d.serviceMap[""]
  	if !ok {
  		sd = &serviceData{
  			funcMap: make(map[string]*funcData),
  		}
  		d.serviceMap[""] = sd
  	}
  
  	if _, ok := sd.funcMap[funcName]; ok {
  		logPanic("gorpc.Dispatcher: function %s has been already registered", funcName)
  	}
  
  	fd := &funcData{
  		fv: reflect.Indirect(reflect.ValueOf(f)),
  	}
  	var err error
  	if fd.inNum, fd.reqt, err = validateFunc(funcName, fd.fv, false); err != nil {
  		logPanic("gorpc.Dispatcher: %s", err)
  	}
  	sd.funcMap[funcName] = fd
  }
docs: // AddFunc registers the given function f under the name funcName.
  //
  // The function must accept zero, one or two input arguments.
  // If the function has two arguments, then the first argument must have
  // string type - the server will pass client address in this parameter.
  //
  // The function must return zero, one or two values.
  //   * If the function has two return values, then the second value must have
  //     error type - the server will propagate this error to the client.
  //
  //   * If the function returns only error value, then the server treats it
  //     as error, not return value, when sending to the client.
  //
  // Arbitrary number of functions can be registered in the dispatcher.
  //
  // See examples for details.