go-grpc-template
A small template for quickly bootstrapping a developer platform independent gRPC golang application. Uses pure Go for building.
What does this do?
This template provides a quick and easy way to get started building a Go app with protobuffers and gRPC. It works platform independent.
How to use it?
- Clone the repo to your machine
- Install the protoc compiler and the Go plugin
- Create your proto files inside the proto directory
- Run
go run ./build
to compile your project into a binary
The result might look like this:
Can I configure the paths and names?
Inside build\build.go
there are a few naming parameters which you can adjust:
// The name of the binary
var OUTPUT_NAME = generateFileName("output")
// The directory which contains the .proto files
var PROTO_DIRECTORY = "./proto"
// Name of the folder where all generated files will be written to
var GENERATED_NAME = "generated"
To make further adjustments to the paths, you might want to take a look at buildProtobuf()
also inside build\build.go
.