character 생성 방식 변경

This commit is contained in:
김도한 [dominick]
2022-11-10 20:41:41 +09:00
parent 8fe1f31bf2
commit 3da59e65cf
3 changed files with 240 additions and 27 deletions

View File

@ -45,6 +45,7 @@ type functionCallContext struct {
// RPCReturnType : RPC 호출 가능한 함수가 유일하게 리턴할 수 있는 타입
type RPCReturnType interface {
Serialize(io.Writer) error
Value() interface{}
Error() error
}
@ -114,6 +115,11 @@ func (r rpcReturnTypeImpl) Error() error {
return r.err
}
// Error : RPCReturnType.Error 구현
func (r rpcReturnTypeImpl) Value() interface{} {
return r.value.Interface()
}
// MakeRPCReturn :
func MakeRPCReturn(value interface{}, err error) RPCReturnType {
return rpcReturnTypeImpl{