code: func (s *Stubs) StubFunc(funcVarToStub interface{}, stubVal ...interface{}) *Stubs {
  	funcPtrType := reflect.TypeOf(funcVarToStub)
  	if funcPtrType.Kind() != reflect.Ptr ||
  		funcPtrType.Elem().Kind() != reflect.Func {
  		panic("func variable to stub must be a pointer to a function")
  	}
  	funcType := funcPtrType.Elem()
  	if funcType.NumOut() != len(stubVal) {
  		panic(fmt.Sprintf("func type has %v return values, but only %v stub values provided",
  			funcType.NumOut(), len(stubVal)))
  	}
  
  	return s.Stub(funcVarToStub, FuncReturning(funcPtrType.Elem(), stubVal...).Interface())
  }
docs: // StubFunc replaces a function variable with a function that returns stubVal.
  // funcVarToStub must be a pointer to a function variable. If the function
  // returns multiple values, then multiple values should be passed to stubFunc.
  // The values must match be assignable to the return values' types.