fix(net/mux/pb) rename proto package -> mux_pb
Brian Tiger Chow committed
Oct 22, 2014 at 05:13 UTC
81367a864e74c8ef8a6a685b892a7519b92c1f4e
3 files changed
+13
-11
net/mux/internal/pb/Makefile
+6
-4
@@ -1,8 +1,10 @@
1
+PB = $(wildcard *.proto)
2
+GO = $(PB:.proto=.pb.go)
3
2
-all: mux.pb.go
4
+all: $(GO)
5
4
-mux.pb.go: mux.proto
5
- protoc --gogo_out=. --proto_path=../../../../../:/usr/local/opt/protobuf/include:. $<
6
+%.pb.go: %.proto
7
+ protoc --gogo_out=. --proto_path=../../../../../../:/usr/local/opt/protobuf/include:. $<
8
9
clean:
8
- rm mux.pb.go
10
+ rm *.pb.go
net/mux/internal/pb/mux.pb.go
+6
-6
@@ -1,9 +1,9 @@
1
-// Code generated by protoc-gen-go.
1
+// Code generated by protoc-gen-gogo.
2
// source: mux.proto
3
// DO NOT EDIT!
4
5
/*
6
-Package mux is a generated protocol buffer package.
6
+Package mux_pb is a generated protocol buffer package.
7
8
It is generated from these files:
9
mux.proto
@@ -11,9 +11,9 @@ It is generated from these files:
11
It has these top-level messages:
12
PBProtocolMessage
13
*/
14
-package mux
14
+package mux_pb
15
16
-import proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/goprotobuf/proto"
16
+import proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/gogoprotobuf/proto"
17
import math "math"
18
19
// Reference imports to suppress errors if they are not otherwise used.
@@ -63,7 +63,7 @@ func (x *ProtocolID) UnmarshalJSON(data []byte) error {
63
}
64
65
type PBProtocolMessage struct {
66
- ProtocolID *ProtocolID `protobuf:"varint,1,req,enum=mux.ProtocolID" json:"ProtocolID,omitempty"`
66
+ ProtocolID *ProtocolID `protobuf:"varint,1,req,enum=mux.pb.ProtocolID" json:"ProtocolID,omitempty"`
67
Data []byte `protobuf:"bytes,2,req" json:"Data,omitempty"`
68
XXX_unrecognized []byte `json:"-"`
69
}
@@ -87,5 +87,5 @@ func (m *PBProtocolMessage) GetData() []byte {
87
}
88
89
func init() {
90
- proto.RegisterEnum("mux.ProtocolID", ProtocolID_name, ProtocolID_value)
90
+ proto.RegisterEnum("mux.pb.ProtocolID", ProtocolID_name, ProtocolID_value)
91
}
net/mux/internal/pb/mux.proto
+1
-1
@@ -1,4 +1,4 @@
1
-package mux;
1
+package mux.pb;
2
3
enum ProtocolID {
4
Test = 0;