pbgen

command
v0.0.0-...-a903834 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 5 Imported by: 0

README

pbgen

This tool exists because I copied the proto description from codetheweb/anylist, but it's in a JSON format I hadn't come across before. It seems like protobufjs is able to ingest this file directly and then work with protos, but I didn't see any equivalent functionality in the Go protobuf libraries, which makes sense because that feature relies on a bit of JS metaprogramming.

So my garbage solution was to turn that JSON file back into a .proto file, which is what pbgen does. I don't know where the original author (codetheweb) got that JSON file from, so that's the best I got.

The generated .proto file can then be turned into Go code with the standard protoc and protoc-gen-go tools. For simplicity, the whole pipeline (JSON -> Proto -> Go) can be run with go generate if you have the necessary tools installed..

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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