flatbuffers/examples/go-echo
Jeroen Demeyer 6c8a8d054d
Go: make generated code more compliant to "go fmt" (#7907)
Co-authored-by: Derek Bailey <derekbailey@google.com>
2023-04-26 05:19:07 +00:00
..
client Use FinshedBytes() in go-echo example instead of manually encoding offset (#7660) 2022-11-29 02:29:48 +00:00
hero Go: make generated code more compliant to "go fmt" (#7907) 2023-04-26 05:19:07 +00:00
net Go: make generated code more compliant to "go fmt" (#7907) 2023-04-26 05:19:07 +00:00
server Use FinshedBytes() in go-echo example instead of manually encoding offset (#7660) 2022-11-29 02:29:48 +00:00
README.md Add --go-module-name flag to support generating Go module compatible code (#7651) 2022-11-22 14:28:01 -08:00
go.mod Add --go-module-name flag to support generating Go module compatible code (#7651) 2022-11-22 14:28:01 -08:00
hero.fbs Add --go-module-name flag to support generating Go module compatible code (#7651) 2022-11-22 14:28:01 -08:00
net.fbs Add --go-module-name flag to support generating Go module compatible code (#7651) 2022-11-22 14:28:01 -08:00

README.md

Go Echo Example

A simple example demonstrating how to send flatbuffers over the network in Go.

Generate flatbuffer code

flatc -g --gen-object-api --go-module-name echo hero.fbs net.fbs

Running example

  1. Run go mod tidy to get dependencies
go mod tidy
  1. Start a server
go run server/server.go
  1. Run the client in another terminal
go run client/client.go