本文整理汇总了Golang中encoding/gob.RegisterName函数的典型用法代码### 示例。如果您正苦于以下问题:Golang RegisterName函数的具体用法?Golang RegisterName怎么用?Golang RegisterName使用的例子?那么恭喜您, 这里精选的函数代码### 示例或许可以为您提供帮助。
在下文中一共展示了RegisterName函数的20个代码### 示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码### 示例。
示例1: init
func init() {
gob.RegisterName("perm.Permission", Permission{})
gob.RegisterName("perm.PermissionSet", PermissionSet{})
gob.RegisterName("perm.Implication", Implication{})
gob.RegisterName("perm.ImplicationSet", ImplicationSet{})
gob.RegisterName("perm.Condition", Condition{})
}
开发者ID:hlandau,项目名称:degoutils,代码行数:7,代码来源:perm.go
示例2: init
func init() {
// implements error
gob.RegisterName("*udpapi.APIError", &APIError{})
// implements APIReply
gob.RegisterName("*udpapi.errorWrapper", &errorWrapper{})
// implements APIReply
gob.RegisterName("*udpapi.genericReply", &genericReply{})
}
开发者ID:kaoruAngel,项目名称:go-anidb,代码行数:8,代码来源:reply.go
示例3: init
func init() {
gob.RegisterName("monsti.NodeContextArgs", NodeContextArgs{})
gob.RegisterName("monsti.NodeContextRet", NodeContextRet{})
gob.RegisterName("monsti.RenderNodeArgs", RenderNodeArgs{})
gob.RegisterName("monsti.RenderNodeRet", RenderNodeRet{})
gob.Register(new(template.HTML))
gob.Register(new(htmlwidgets.RenderData))
}
开发者ID:Ali-Kabiri,项目名称:monsti,代码行数:8,代码来源:signals.go
示例4: init
func init() {
// register oauthmw stores for use by gob.encode/decode (ie various binary sessionmw.Store types)
gob.RegisterName("knq.oauthmw.Store", Store{})
gob.RegisterName("knq.oauthmw.StoreState", StoreState{})
// register oauthmw for use with jsonstore
//jsonstore.RegisterSchema("knq.oauthmw.Store", Store{})
//jsonstore.RegisterSchema("knq.oauthmw.StoreState", StoreState{})
}
开发者ID:knq,项目名称:oauthmw,代码行数:9,代码来源:store.go
示例5: init
func init() {
// To make it possible to save the inventory, all object types have to be registered with gob.
// Use strings of one character to save bandwidth.
// If the letter for a type is changed, it will be lost for all inventories using the type.
gob.RegisterName("P", &Potion{})
gob.RegisterName("W", &Weapon{})
gob.RegisterName("A", &Armor{})
gob.RegisterName("H", &Helmet{})
gob.RegisterName("S", &Scroll{})
}
开发者ID:xushiwei,项目名称:ephenation-server,代码行数:10,代码来源:ObjectList.go
最后编辑: kuteng 文档更新时间: 2021-08-23 19:14 作者:kuteng