Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ftr: add dubbo-go cli and edit readme #1971

Merged
merged 5 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ We do not merge pr with ci tests failed
- [ ] All ut passed (run 'go test ./...' in project root)
- [ ] After go-fmt ed , run 'go fmt project' using goland.
- [ ] Golangci-lint passed, run 'sudo golangci-lint run' in project root.
- [ ] After import formatted, (using [imports-formatter](https://github.com/dubbogo/tools#5-how-to-get-imports-formatter) to run 'imports-formatter .' in project root, to format your import blocks, mentioned in [CONTRIBUTING.md](https://github.com/apache/dubbo-go/blob/master/CONTRIBUTING.md) above)
- [ ] Your new-created file needs to have [apache license](https://raw.githubusercontent.com/dubbogo/resources/master/tools/license/license.txt) at the top, like other existed file does.
- [ ] All integration test passed. You can run integration test locally (with docker env). Clone our [dubbo-go-samples](https://github.com/apache/dubbo-go-samples) project and replace the go.mod to your dubbo-go, and run 'sudo sh start_integration_test.sh' at root of samples project root. (M1 Slice is not Support)
14 changes: 0 additions & 14 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,6 @@ jobs:
go get -v -t -d ./...
fi

- name: Install imports-formatter
run: |
export PATH=$PATH:$(go env GOPATH)/bin
export GO111MODULE=on
cd ~
go get -u github.com/dubbogo/tools/cmd/imports-formatter@v1.0.7

- name: Check improts
run: |
export $(go env | grep GOROOT | sed 's/\"//g')
echo $GOROOT
imports-formatter -path .
git status && [[ -z `git status -s` ]]

- name: gofmt
run: |
go fmt ./... && git status && [[ -z `git status -s` ]]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ Dubbo-go has supported many RPC protocol, like Triple, Dubbo JSONRPC, gRPC, HTTP

* [imports-formatter](https://github.com/dubbogo/tools/blob/master/cmd/imports-formatter/main.go) formatting dubbo-go project import code block.
* [dubbo-go-cli](https://github.com/dubbogo/tools/blob/master/cmd/dubbogo-cli/main.go) dubbo-go command line tools, by which you can define your own request pkg and gets rsp struct of your server, test your service as telnet and generate hessian.POJO register method body.
* [dubbo-go-cli-v2](https://github.com/dubbogo/tools/blob/master/cmd/dubbogo-cli-v2/main.go) new dubbo-go line tools, you can get services from register center, create a demo and has the same features with [dubbo-go-cli](https://github.com/dubbogo/tools/blob/master/cmd/dubbogo-cli/main.go).
* [dubbo-go-cli-v2](https://github.com/apache/dubbo-go/blob/master/dubbogo-cli/main.go) new dubbo-go line tools, you can get services from register center, create a demo , create application templates, one-click installation of protoc-gen-go-triple and imports-formatter tools,and has the same features with [dubbo-go-cli](https://github.com/dubbogo/tools/blob/master/cmd/dubbogo-cli/main.go).
* [protoc-gen-go-triple](https://github.com/dubbogo/tools/blob/master/cmd/protoc-gen-go-triple/main.go) tripe protocol pb file generation tool.
* [protoc-gen-dubbo3grpc](https://github.com/dubbogo/tools/blob/master/cmd/protoc-gen-dubbo3grpc/main.go) dubbo3 grpc pb file generation tool.


If you want to know more about dubbogo tools, please visit https://github.com/dubbogo/tools and read its readme carefully.
If you want to know more about dubbogo tools, please visit https://github.com/apache/dubbo-go/blob/master/dubbogo-cli and read its readme carefully.

## Intellij Plugin

Expand Down
4 changes: 2 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ Dubbo-go 生态覆盖多种网络协议:Triple、Dubbo、JSONRPC、gRPC、HTTP

* [imports-formatter](https://github.com/dubbogo/tools/blob/master/cmd/imports-formatter/main.go) dubbo-go 工程 import 代码块格式化工具
* [dubbo-go-cli](https://github.com/dubbogo/tools/blob/master/cmd/dubbogo-cli/main.go) dubbo-go 命令行工具、支持展示服务、发起服务调用、定义 dubbogo 服务 struct 等功能、生成 hessian.POJO 方法体
* [dubbo-go-cli-v2](https://github.com/dubbogo/tools/blob/master/cmd/dubbogo-cli-v2/main.go) 新 dubbo-go 命令行工具, 支持创建 demo、从注册中心获取服务列表以及兼容 [dubbo-go-cli](https://github.com/dubbogo/tools/blob/master/cmd/dubbogo-cli/main.go) 的所有功能
* [dubbo-go-cli-v2](https://github.com/apache/dubbo-go/blob/master/dubbogo-cli/main.go) 新 dubbo-go 命令行工具, 支持创建 demo、创建应用模版、一键安装 protoc-gen-go-triple 及 imports-formatter 工具,从注册中心获取服务列表以及兼容 [dubbo-go-cli](https://github.com/dubbogo/tools/blob/master/cmd/dubbogo-cli/main.go) 的所有功能
* [protoc-gen-go-triple](https://github.com/dubbogo/tools/blob/master/cmd/protoc-gen-go-triple/main.go) tripe 协议 pb 生成工具
* [protoc-gen-dubbo3grpc](https://github.com/dubbogo/tools/blob/master/cmd/protoc-gen-dubbo3grpc/main.go) dubbo3 grpc 生成工具

如果想知道 dubbogo 工具集更多更详细的使用细节,请访问 https://github.com/dubbogo/tools 并仔细阅读其 raedme。
如果想知道 dubbogo 工具集更多更详细的使用细节,请访问 https://github.com/apache/dubbo-go/blob/master/dubbogo-cli 并仔细阅读其 raedme。

## Intellij 插件

Expand Down
4 changes: 2 additions & 2 deletions config/consumer_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (cc *ConsumerConfig) Init(rc *RootConfig) error {
triplePBService, ok := reference.(common.TriplePBService)
if !ok {
logger.Errorf("Dubbo-go cannot get interface name with reference = %s."+
"Please run the command 'go install github.com/dubbogo/tools/cmd/protoc-gen-go-triple@latest' to get the latest "+
"Please run the command 'go install github.com/dubbogo/dubbogo-cli/cmd/protoc-gen-go-triple@latest' to get the latest "+
"protoc-gen-go-triple, and then re-generate your pb file again by this tool."+
"If you are not using pb serialization, please set 'interfaceName' field in reference config to let dubbogo get the interface name.", key)
continue
Expand Down Expand Up @@ -114,7 +114,7 @@ func (cc *ConsumerConfig) Load() {
triplePBService, ok := refRPCService.(common.TriplePBService)
if !ok {
logger.Errorf("Dubbo-go cannot get interface name with registeredTypeName = %s."+
"Please run the command 'go install github.com/dubbogo/tools/cmd/protoc-gen-go-triple@latest' to get the latest "+
"Please run the command 'go install github.com/dubbogo/dubbogo-cli/cmd/protoc-gen-go-triple@latest' to get the latest "+
"protoc-gen-go-triple, and then re-generate your pb file again by this tool."+
"If you are not using pb serialization, please set 'interfaceName' field in reference config to let dubbogo get the interface name.", registeredTypeName)
continue
Expand Down
4 changes: 2 additions & 2 deletions config/provider_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (c *ProviderConfig) Init(rc *RootConfig) error {
supportPBPackagerNameSerivce, ok := service.(common.TriplePBService)
if !ok {
logger.Errorf("Service with reference = %s is not support read interface name from it."+
"Please run go install github.com/dubbogo/tools/cmd/protoc-gen-go-triple@latest to update your "+
"Please run go install github.com/dubbogo/dubbogo-cli/cmd/protoc-gen-go-triple@latest to update your "+
"protoc-gen-go-triple and re-generate your pb file again."+
"If you are not using pb serialization, please set 'interface' field in service config.", key)
continue
Expand Down Expand Up @@ -169,7 +169,7 @@ func (c *ProviderConfig) Load() {
serviceConfig = NewServiceConfigBuilder().Build()
if !ok {
logger.Errorf("Dubbogo do not read service interface name with registeredTypeName = %s."+
"Please run go install github.com/dubbogo/tools/cmd/protoc-gen-go-triple@latest to update your "+
"Please run go install github.com/dubbogo/dubbogo-cli/cmd/protoc-gen-go-triple@latest to update your "+
"protoc-gen-go-triple and re-generate your pb file again."+
"If you are not using pb serialization, please set 'interface' field in service config.", registeredTypeName)
continue
Expand Down
2 changes: 2 additions & 0 deletions dubbogo-cli/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
go test ./...