protoc-gen-go-errors

command
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 14 Imported by: 0

README

protoc-gen-go-errors

This directory is retained for proto contract compatibility, but it no longer generates the old github.com/aisphereio/kernel/errors runtime error type.

It now generates helpers backed by github.com/aisphereio/kernel/errorx.

The binary name and protoc flag remain:

--go-errors_out=paths=source_relative:.

This avoids forcing every existing proto file and build script to change at once.

Generated helpers:

func IsXxx(err error) bool
func NewXxx(message string, opts ...errorx.Option) *errorx.Error
func ErrorXxx(format string, args ...interface{}) *errorx.Error

The proto annotation import also remains compatible:

import "errors/errors.proto";

enum UserErrorReason {
  option (errors.default_code) = 500;
  USER_NOT_FOUND = 0 [(errors.code) = 404];
}

Runtime rule: do not import github.com/aisphereio/kernel/errors; use github.com/aisphereio/kernel/errorx.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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