Skip to content

A CLI tool to concatenate multiple proto files into a single file.

License

Notifications You must be signed in to change notification settings

syumai/protocat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A CLI tool to concatenate multiple proto files into a single file.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages