protoc-gen-go-micro

April 24, 2025 · View on GitHub

protobuf plugin to generate helper code for micro framework

A generic code/script/data generator based on Protobuf.


This project is a generator plugin for the Google Protocol Buffers compiler (protoc).

Usage

$> protoc --go_micro_out=debug=true,components="micro|http":. input.proto
OptionDefault ValueAccepted ValuesDescription
tag_path.any local pathpath contains generated protobuf code that needs to be tagged
debug              false      true or falseif true, protoc will generate a more verbose output
componentsmicromicro rpc http chi gorilla client serversome values can't coexists like gorilla/chi or rpc/http, values must be concatinated with pipe symbol

Install

  • Install the go compiler and tools from https://golang.org/doc/install
  • Install protoc-gen-go: go install google.golang.org/protobuf/cmd/protoc-gen-go
  • Install protoc-gen-go-micro: go install go.unistack.org/protoc-gen-go-micro/v4