Make package naming meet Go requirements and
This commit is contained in:
parent
3c7ebec0dd
commit
d6d61cf4d1
6
.gitignore
vendored
6
.gitignore
vendored
@ -73,3 +73,9 @@ $RECYCLE.BIN/
|
||||
|
||||
|
||||
# End of https://www.gitignore.io/api/windows,osx,linux,jebtrain
|
||||
|
||||
# For this project
|
||||
|
||||
/gen/
|
||||
|
||||
# End this project
|
||||
|
@ -4,7 +4,7 @@ package bdchain.api;
|
||||
|
||||
import "bdchain/api/common.proto";
|
||||
|
||||
option go_package = "bdchain/api/ac_chain";
|
||||
option go_package = "bdchain/api/grpc/acchain";
|
||||
option java_package = "bdchain.api.grpc";
|
||||
option java_outer_classname = "AccountingChainProto";
|
||||
option java_multiple_files = true;
|
||||
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
||||
|
||||
package bdchain.api;
|
||||
|
||||
option go_package = "bdchain/api/common";
|
||||
option go_package = "bdchain/api/grpc/common";
|
||||
option java_package = "bdchain.api.grpc";
|
||||
option java_outer_classname = "CommonProto";
|
||||
option java_multiple_files = true;
|
||||
|
@ -5,7 +5,7 @@ package bdchain.api;
|
||||
import "google/protobuf/empty.proto";
|
||||
import "bdchain/api/common.proto";
|
||||
|
||||
option go_package = "bdchain/api/tx_ledger";
|
||||
option go_package = "bdchain/api/grpc/txledger";
|
||||
option java_package = "bdchain.api.grpc";
|
||||
option java_outer_classname = "TransactionLedgerProto";
|
||||
option java_multiple_files = true;
|
||||
|
14
gen.bat
14
gen.bat
@ -1,4 +1,10 @@
|
||||
mkdir gen\go
|
||||
protoc -I . --go_out=plugins=grpc:gen/go bdchain/api/common.proto
|
||||
protoc -I . --go_out=plugins=grpc:gen/go bdchain/api/tx_ledger.proto
|
||||
protoc -I . --go_out=plugins=grpc:gen/go bdchain/api/ac_chain.proto
|
||||
@echo off
|
||||
set dir=.\gen\go
|
||||
|
||||
if not exist %dir% mkdir %dir%
|
||||
protoc -I . --go_out=plugins=grpc:%dir% bdchain/api/common.proto
|
||||
protoc -I . --go_out=plugins=grpc:%dir% bdchain/api/tx_ledger.proto
|
||||
protoc -I . --go_out=plugins=grpc:%dir% bdchain/api/ac_chain.proto
|
||||
|
||||
echo All Done!
|
||||
pause.
|
||||
|
Loading…
Reference in New Issue
Block a user