proton

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

proton

cli protobuf to json converter.

Installation

Execute:

$ go get github.com/beatlabs/proton

Or download from Releases

Or using Homebrew 🍺

brew tap beatlabs/proton https://github.com/beatlabs/proton
brew install proton

Usage

Usage:
  proton json [flags]

Flags:
  -f, --file string      Proto file path or url
  -h, --help             help for json
      --indent           Indent output json
  -p, --package string   Proto package
  -t, --type string      Proto message type

Examples

Proto file from URL with input message as argument

proton json -f https://raw.githubusercontent.com/protocolbuffers/protobuf/master/examples/addressbook.proto -p tutorial -t AddressBook testdata/out.bin

Proto file from local with input message as argument

proton json -f ./testdata/addressbook.proto -p tutorial -t AddressBook testdata/out.bin

Proto file from URL with input message piped

cat testdata/out.bin | proton json -f https://raw.githubusercontent.com/protocolbuffers/protobuf/master/examples/addressbook.proto -p tutorial -t AddressBook

Proto file from local with input message piped

cat testdata/out.bin | proton json -f ./testdata/addressbook.proto -p tutorial -t AddressBook

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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