You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dsMin/dsBaseWeb/Test/jiexi_proto_test.go

21 lines
423 B

package Test
import (
"fmt"
"io/ioutil"
"log"
"testing"
)
// go get -u github.com/golang/protobuf/protoc-gen-go
func TestProto(t *testing.T) {
in, err := ioutil.ReadFile("../RpcService/BaseGlobal/BaseGlobal.proto")
if err != nil {
log.Fatalln("Error reading file:", err)
}
fmt.Println(string(in))
//if err := proto.Unmarshal(in, book); err != nil {
// log.Fatalln("Failed to parse address book:", err)
//}
}