🎨
golang-guidance
  • Go Guidance
  • Golang Fundamental
    • Basic Golang
    • Pseudo OOP
    • Konkurensi
  • Design Pattern
    • Singleton
    • Dependency Injection
  • Build Rest API Framework
    • Pengenalan Rest API
    • Start up
    • Shutdown
    • Json
    • Database
    • Clean architecture
    • Configuration
    • Fatal
    • Logging
    • Routing
    • CRUD
    • Request Response Helper
    • Error Handler
    • Unit Testing
    • API Testing
    • Context
    • Validation
    • Middleware
    • Token
    • Role Based Access Controller
  • GraphQL Framework
    • Pengenalan GraphQL
  • gRPC Framework
    • Pengenalan gRPC
    • Protocol Buffer
    • makefile
    • gRPC Server
    • Config
    • Database
    • Routing
    • Clean Architecture
    • gRPC Client
    • Tracing
    • Caching
    • gRPC Testing
Powered by GitBook
On this page

Was this helpful?

  1. gRPC Framework

makefile

PreviousProtocol BufferNextgRPC Server

Last updated 3 years ago

Was this helpful?

  • Buat file makefile

init:
  go mod init skeleton

gen:
    protoc --proto_path=proto --go_out=paths=source_relative,plugins=grpc:./pb proto/*/*.proto

.PHONY: init gen
  • install

  • Uji installasi protoc protoc --version

  • jalankan perintah berikut:

make init
mkdir pb
make gen
  • jika terjadi error makefile:2: *** missing separator. Stop. Hal itu mungkin disebabkan karena copy paste. Pastikan jarak indentasi merupakan tab, bukan spasi.

protoc