gpt4 book ai didi

protocol-buffers - 在protobuf的proto文件中为GRPC导入时间戳

转载 作者:行者123 更新时间:2023-12-04 14:23:40 29 4
gpt4 key购买 nike

我正在尝试使用gRPC并将交换消息格式用作protobuf。
我想在邮件中添加时间戳字段。但是我不知道在原始文件中添加导入语句的正确方法。我正在使用Golang,所以我需要输出为.pb.go

最佳答案

确保导入原始文件:

import "google/protobuf/timestamp.proto";

并为您的变量使用类型,例如:
google.protobuf.Timestamp time_name = 1;

关于protocol-buffers - 在protobuf的proto文件中为GRPC导入时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44468734/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com