|
|
@@ -8,6 +8,7 @@ import (
|
|
|
"github.com/golang/protobuf/proto"
|
|
|
)
|
|
|
|
|
|
+// protobuf测试接口
|
|
|
func TestProto() {
|
|
|
s1 := &student.Student{} //第一个学生信息
|
|
|
s1.Name = "jz01"
|
|
|
@@ -46,4 +47,4 @@ func TestProto() {
|
|
|
msg1 := &testmsg.TestMessage{}
|
|
|
proto.Unmarshal(buffer, msg1)
|
|
|
fmt.Println("反序列化之后的信息为:", msg1)
|
|
|
-}
|
|
|
+}
|