MCPcopy
hub / github.com/davyxu/cellnet / NewType

Method NewType

meta.go:52–58  ·  view source on GitHub ↗

创建meta类型的实例

()

Source from the content-addressed store, hash-verified

50
51// 创建meta类型的实例
52func (self *MessageMeta) NewType() interface{} {
53 if self.Type == nil {
54 return nil
55 }
56
57 return reflect.New(self.Type).Interface()
58}
59
60// 为meta对应的名字绑定上下文
61func (self *MessageMeta) SetContext(name string, data interface{}) *MessageMeta {

Callers 2

MessageMethod · 0.80
DecodeMessageFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected