提交 81367a86 作者: Brian Tiger Chow

fix(net/mux/pb) rename proto package -> mux_pb

上级 6e9e29b8
PB = $(wildcard *.proto)
GO = $(PB:.proto=.pb.go)
all: mux.pb.go all: $(GO)
mux.pb.go: mux.proto %.pb.go: %.proto
protoc --gogo_out=. --proto_path=../../../../../:/usr/local/opt/protobuf/include:. $< protoc --gogo_out=. --proto_path=../../../../../../:/usr/local/opt/protobuf/include:. $<
clean: clean:
rm mux.pb.go rm *.pb.go
// Code generated by protoc-gen-go. // Code generated by protoc-gen-gogo.
// source: mux.proto // source: mux.proto
// DO NOT EDIT! // DO NOT EDIT!
/* /*
Package mux is a generated protocol buffer package. Package mux_pb is a generated protocol buffer package.
It is generated from these files: It is generated from these files:
mux.proto mux.proto
...@@ -11,9 +11,9 @@ It is generated from these files: ...@@ -11,9 +11,9 @@ It is generated from these files:
It has these top-level messages: It has these top-level messages:
PBProtocolMessage PBProtocolMessage
*/ */
package mux package mux_pb
import proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/goprotobuf/proto" import proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/gogoprotobuf/proto"
import math "math" import math "math"
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
...@@ -63,7 +63,7 @@ func (x *ProtocolID) UnmarshalJSON(data []byte) error { ...@@ -63,7 +63,7 @@ func (x *ProtocolID) UnmarshalJSON(data []byte) error {
} }
type PBProtocolMessage struct { type PBProtocolMessage struct {
ProtocolID *ProtocolID `protobuf:"varint,1,req,enum=mux.ProtocolID" json:"ProtocolID,omitempty"` ProtocolID *ProtocolID `protobuf:"varint,1,req,enum=mux.pb.ProtocolID" json:"ProtocolID,omitempty"`
Data []byte `protobuf:"bytes,2,req" json:"Data,omitempty"` Data []byte `protobuf:"bytes,2,req" json:"Data,omitempty"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
} }
...@@ -87,5 +87,5 @@ func (m *PBProtocolMessage) GetData() []byte { ...@@ -87,5 +87,5 @@ func (m *PBProtocolMessage) GetData() []byte {
} }
func init() { func init() {
proto.RegisterEnum("mux.ProtocolID", ProtocolID_name, ProtocolID_value) proto.RegisterEnum("mux.pb.ProtocolID", ProtocolID_name, ProtocolID_value)
} }
package mux; package mux.pb;
enum ProtocolID { enum ProtocolID {
Test = 0; Test = 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论