protogo

command module
v0.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2025 License: MIT Imports: 13 Imported by: 0

README

protogo

This package is not in any way related to the protobuf and flexbuffers developers and/or maintainers!

BUILD Go Reference

protogo is an automatization tool for Go + protobuf/flatbuffers + gRPC builds!

You can run it with the same arguments as go executable, followed by -- flag and then compiler name (protoc or flatc) and its arguments. Just like this:

protogo version -- protoc --version

Or like this:

protogo version -- flatc --version

Both parts are optional and can be skipped, thus can be used as protoc or flatc installer. Compiler executable (denoted as [COMPILER_NAME], either protoc or flatc) will be placed into ${PROTOGO_CACHE}/[COMPILER_NAME]-${PROTOGO_PROTOC_VERSION}/bin, this directory can be added to $PATH.

Protogo will handle everything else, including protoc/flatc binaries installation, installing required packages, etc. Use official gRPC installation guide as reference.

Originally, a part of SeasideVPN project.

Inspired by similar projects for other languages, including (but not limited to) protoc-exe and protoc-prebuilt.

You can additionally control it with the following environment variables:

  • PROTOGO_GO_EXECUTABLE: define go executable to use, default: go
  • PROTOGO_PROTOC_VERSION: define protoc version to use, should match protobuf release tags (with or without v prefix), default: latest
    NB! If local is specified as protoc version, local installation will be used
  • PROTOGO_FLATC_VERSION: define flatc version to use, should match protobuf release tags (with or without v prefix), default: latest
    NB! If local is specified as flatc version, local installation will be used
  • PROTOGO_PROTOC_INCLUDE: comma-separated list of "special" includes, can include standard (for standard types) and googleapis (for common Google APIs types)
  • PROTOGO_FLATC_DISTRO: select distribution of flatc for linux (can be either g++ or clang, default g++)
  • PROTOGO_CACHE: define cache directory, where protoc executables will be stored, default: ~/.cache/protogo
  • PROTOGO_GITHUB_BEARER_TOKEN: GitHub authentication token for API requests (release assets retrieval)
  • PROTOGO_LOG_LEVEL: define logging level, the levels match logrus ones

Documentation

Overview

Package provides automated protoc compiler downloading and preparing environment pipeline, for use of GO with protobuf and gRPC.

The description of the pipeline being automated can be found on official gRPC GO quickstart website.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL