package
0.0.0-20221003175646-f21b37fa8a7a
Repository: https://github.com/vladiant/golangsamples.git
Documentation: pkg.go.dev
# README
Beginners Guide to gRPC in Go
Based on Beginners Guide to gRPC in Go! from TutorialEdge YouTube channel.
Environment
- Ubuntu 20
- Visual Studio Code + Go plugin
- Go version 1.13.8
Steps to create
- Read to follow: gRPC Quick start
- Install protocol compiler:
sudo apt install protobuf-compiler
export PATH="$PATH:$(go env GOPATH)/bin"
export GO111MODULE=on
go get google.golang.org/protobuf/cmd/protoc-gen-go google.golang.org/grpc/cmd/protoc-gen-go-grpc
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
- Prepare files
server.go
,chat.proto
andchat
folder. go get -u github.com/golang/protobuf/protoc-gen-go
protoc --go_out=./chat --go_opt=paths=source_relative --go-grpc_out=./chat --go-grpc_opt=paths=source_relative chat.proto
- Prepare
chat.go
go mod init chat
to create local module. Replacedgo mod init github.com/tutorialedge/go-grpc-tutorial/chat
from tutorial.- Prepare
client.go
# Packages
No description provided by the author