command
module
Version:
v1.1.0
Opens a new window with list of versions in this module.
Published: Jun 27, 2021
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
protoc-gen-go-dracarys
一个protobuf
编译器插件,设计用于Dracarys
框架的代码生成。
先决条件
-
protobuf编译器
请自行安装protoc
编译器。
安装地址
-
Golang Protobuf代码生成器
获取golang protobuf代码生成器:
go get -u github.com/golang/protobuf/protoc-gen-go
安装
快速开始
-
编写protobuf
文件
例:
syntax = "proto3";
package helloworld;
option go_package="/helloworld";
service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply) {}
}
message HelloRequest {
string msg = 1;
}
message HelloReply {
string msg = 1;
}
-
执行命令生成 pb.go
文件
protoc --go-dracarys_out=. helloworld.proto
一个Dracarys
框架所需的代码就生成了。😝
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.