示例#1
0
文件: file.go 项目: maditya/protobuf
func NotGoogleProtobufDescriptorProto(file *descriptor.FileDescriptorProto) bool {
	// can not just check if file.GetName() == "google/protobuf/descriptor.proto" because we do not want to assume compile path
	_, fileName := filepath.Split(file.GetName())
	return !(file.GetPackage() == "google.protobuf" && fileName == "descriptor.proto")
}
示例#2
0
func IsProto3(file *google_protobuf.FileDescriptorProto) bool {
	return file.GetSyntax() == "proto3"
}