starlarkproto:在Starlark中支持protobuffers

时间:2024-03-09 01:43:13
【文件属性】:

文件名称:starlarkproto:在Starlark中支持protobuffers

文件大小:20KB

文件格式:ZIP

更新时间:2024-03-09 01:43:13

Go

星云母 在starlark中支持原缓冲! test = proto . file ( "github.com/emcfarlane/starlarkproto/testpb/star.proto" ) m = test . Message ( body = "Hello, world!" ) print ( m ) # Message(body = Hello, world!, type = UNKNOWN, ...) m . type = "GREETING" # Enums can be assigned by String, Int or proto.Enum print ( m ) # Message(body = Hello, world!, type = GREETING, ...) greeting = test . Message . Type . GREETIN


【文件预览】:
starlarkproto-master
----testdata()
--------proto.star(3KB)
----starlarkproto_test.go(2KB)
----LICENSE(1KB)
----starlarkproto.go(42KB)
----testpb()
--------star.pb.go(19KB)
--------lark.pb.go(5KB)
--------lark.proto(135B)
--------star.proto(846B)
----go.sum(2KB)
----README.md(725B)
----go.mod(193B)

网友评论