# srv_admin **Repository Path**: ikaiguang/srv_admin ## Basic Information - **Project Name**: srv_admin - **Description**: admin - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-01-13 - **Last Updated**: 2021-02-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # srv_admin 安装 protoc-gen-go-tkform protoc-gen-go-tkgrpc ```shell script # 安装编译工具 protoc-gen-go@v1.25.0 protoc-gen-go-grpc@v1.4.3 go get github.com/ikaiguang/protoc-gen-go/cmd/protoc-gen-go-tkform go get github.com/ikaiguang/protoc-gen-go/cmd/protoc-gen-go-tkgrpc # 添加环境变量 $GOSRCPATH $GOPBPATH # export GOSRCPATH=$GOPATH/src # export GOPBPATH=$GOPATH/src/github.com/go-kratos/kratos/third_party # 切换到需要编译的文件夹 # cd $GOPATH/src/github.com/ikaiguang/srv_admin/api/xxx # google.golang.org/protobuf@v1.25.0 + google.golang.org/grpc@v1.34.0 # google.golang.org/protobuf@v1.25.0_form + github.com/golang/protobuf@1.4.3_grpc # protoc-gen-go-tkform + protoc-gen-go-tkgrpc protoc -I. -I%GOSRCPATH% -I%GOPBPATH% --go-tkform_out=. --go-tkform_opt=paths=source_relative --go-tkgrpc_out=. --go-tkgrpc_opt=paths=source_relative ./*.proto protoc -I. -I$GOSRCPATH -I$GOPBPATH --go-tkform_out=. --go-tkform_opt=paths=source_relative --go-tkgrpc_out=. --go-tkgrpc_opt=paths=source_relative ./*.proto # generate BM HTTP kratos tool protoc --bm *.proto ```