mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
ed5172731c
Former-commit-id: 983161656b264289fb664ca4237bf2a9fccbc5da |
||
---|---|---|
.. | ||
protos | ||
go.mod | ||
main.go | ||
README.md |
Protocol Buffers
The Context.Protobuf(proto.Message)
is the method which sends protos to the client. It accepts a proto.Message value.
Note: Iris is using the newest version of the Go protocol buffers implementation. Read more about it at The Go Blog: A new Go API for Protocol Buffers.
- Install the protoc-gen-go tool.
$ go get -u google.golang.org/protobuf/cmd/protoc-gen-go@latest
- Generate proto
$ protoc -I protos/ protos/hello.proto --go_out=.