protoc-gen-sphere-errors

command module
v0.0.0-...-f8808d1 Latest Latest
Warning

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

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

README

protoc-gen-sphere-errors

protoc-gen-sphere-errors is a protoc plugin that generates error handling code from .proto files. It is designed to inspect service definitions within your protobuf files and automatically generate corresponding error handling code based on a specified template. This code refers to protoc-gen-go-errors.

Installation

To install protoc-gen-sphere, use the following command:

go install github.com/TBXark/sphere/cmd/protoc-gen-go-errors@latest

Usage with Buf

To use protoc-gen-sphere-errors with buf, you can configure it in your buf.gen.yaml file. Here is an example configuration:

version: v2
managed:
  enabled: true
  disable:
    - file_option: go_package_prefix
      module: buf.build/tbxark/errors
  override:
    - file_option: go_package_prefix
      value: github.com/TBXark/sphere/layout/api
    - local: protoc-gen-sphere-errors
      out: api
      opt: paths=source_relative

You will also need to configure the protoc-gen-sphere-errors plugin in your buf.gen.yaml so that buf knows how to execute it.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
generate

Jump to

Keyboard shortcuts

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