Categorygithub.com/Aris-haryanto/Best-Way-To-Structuring-Golang-Code
module
0.0.0-20221230150210-ae9bf17443fd
Repository: https://github.com/aris-haryanto/best-way-to-structuring-golang-code.git
Documentation: pkg.go.dev

# README

Note

This repo is a example for this article https://arisharyanto.medium.com/best-way-to-structuring-golang-code-6e619e70ce38

How to Run

Run environment

$ docker-compose up -d

Install GRPC

follow this http://google.github.io/proto-lens/installing-protoc.html to install protobuf in your PC

and then run this in you cli

$ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

Activate Proto Shell

open bash_profile file

$ nano ~/.bash_profile

add this code inside

export GO_PATH=~/go
export PATH=$PATH:/$GO_PATH/bin

then save.

and then run this

$ source ~/.bash_profile

Generate Your Proto file

$ protoc -I./proto --go_out=./proto --go-grpc_out=./proto ./proto/*.proto

Run the code

$ go run cmd/*.go

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author