protoc-gen-alias

command
v0.0.0-...-bbc7888 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

protoc-gen-alias

protoc-gen-alias is a plugin for protoc which type alias for all messages, such that one protobuf definition can be consumed from many Go packages

Usage

Usage is typically through buf, but you can use directly. See test/Makefile for example usage.

Configuration

The plugin looks for a comment like +cue-gen:Simple:versions:v1,v1alpha on the package. This will generate aliases to the current version, for all versions listed (the current version is ignored).

Examples Of Generated Code

// Code generated by protoc-gen-jsonshim. DO NOT EDIT.
type Simple = v1.Simple
type Simple_Name = v1.Simple_Name
type Simple_Number = v1.Simple_Number
type SimpleWithMap = v1.SimpleWithMap
type SimpleWithMap_Nested = v1.SimpleWithMap_Nested
type ReferencedMap = v1.ReferencedMap
type ImportedReference = v1.ImportedReference

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
test
v1
v1alpha
Code generated by protoc-gen-alias.
Code generated by protoc-gen-alias.

Jump to

Keyboard shortcuts

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