protocat

package module
v0.0.0-...-f1fe487 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 8 Imported by: 0

README

protocat

  • protocat concatenates multiple proto files into 1 file.
    • files must be in a single package.

Installation

go get github.com/syumai/protocat/cmd/protocat

Usage

# import paths must be specified by `-I` flag.
protocat -I=example,third_party/protobuf/src example-a.proto example-b.proto

example/example-a.proto

syntax = "proto3";

package example;

import "example-b.proto";

message A {
    B b = 1;
}

example/example-b.proto

syntax = "proto3";

package example;

import "google/protobuf/any.proto";

message B {
    google.protobuf.Any any = 1;
}

output

syntax = "proto3";

package example;

import "google/protobuf/any.proto";

message A {
  B b = 1;
}

message B {
  google.protobuf.Any any = 1;
}

License

MIT

Author

syumai

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcatFiles

func ConcatFiles(importPaths []string, fileNames ...string) (io.Reader, error)

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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