fix: plugin name

This commit is contained in:
zhuyasen
2025-09-10 12:37:15 +08:00
parent ca32dbb6f7
commit 1903730499
3 changed files with 5 additions and 7 deletions

View File

@@ -22,10 +22,10 @@ It can execute high-concurrency requests efficiently and push real-time statisti
### 📦 Installation ### 📦 Installation
```bash ```bash
go install github.com/go-dev-frame/sponge/cmd/perftest@latest go install github.com/go-dev-frame/sponge/cmd/sponge@latest
``` ```
After installation, run `perftest -h` to see usage. After installation, run `sponge perftest -h` to see usage.
<br> <br>

View File

@@ -22,10 +22,10 @@
### 📦 安装 ### 📦 安装
```bash ```bash
go install github.com/go-dev-frame/sponge/cmd/perftest@latest go install github.com/go-dev-frame/sponge/cmd/sponge@latest
``` ```
安装完成后,执行 `perftest -h` 查看帮助。 安装完成后,执行 `sponge perftest -h` 查看帮助。
<br> <br>

View File

@@ -24,7 +24,6 @@ var pluginNames = []string{
"protoc-gen-go-gin", "protoc-gen-go-gin",
"protoc-gen-go-rpc-tmpl", "protoc-gen-go-rpc-tmpl",
"protoc-gen-json-field", "protoc-gen-json-field",
"perftest",
"protoc-gen-openapiv2", "protoc-gen-openapiv2",
"protoc-gen-doc", "protoc-gen-doc",
"swag", "swag",
@@ -42,7 +41,6 @@ var installPluginCommands = map[string]string{
"protoc-gen-go-gin": "github.com/go-dev-frame/sponge/cmd/protoc-gen-go-gin@latest", "protoc-gen-go-gin": "github.com/go-dev-frame/sponge/cmd/protoc-gen-go-gin@latest",
"protoc-gen-go-rpc-tmpl": "github.com/go-dev-frame/sponge/cmd/protoc-gen-go-rpc-tmpl@latest", "protoc-gen-go-rpc-tmpl": "github.com/go-dev-frame/sponge/cmd/protoc-gen-go-rpc-tmpl@latest",
"protoc-gen-json-field": "github.com/go-dev-frame/sponge/cmd/protoc-gen-json-field@latest", "protoc-gen-json-field": "github.com/go-dev-frame/sponge/cmd/protoc-gen-json-field@latest",
"perftest": "github.com/go-dev-frame/sponge/cmd/perftest@latest",
"protoc-gen-openapiv2": "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest", "protoc-gen-openapiv2": "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest",
"protoc-gen-doc": "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest", "protoc-gen-doc": "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest",
"swag": "github.com/swaggo/swag/cmd/swag@v1.8.12", "swag": "github.com/swaggo/swag/cmd/swag@v1.8.12",
@@ -181,7 +179,7 @@ func installPlugins(lackNames []string) {
func adaptInternalCommand(name string, pkgAddr string) string { func adaptInternalCommand(name string, pkgAddr string) string {
if name == "protoc-gen-go-gin" || name == "protoc-gen-go-rpc-tmpl" || if name == "protoc-gen-go-gin" || name == "protoc-gen-go-rpc-tmpl" ||
name == "protoc-gen-json-field" || name == "perftest" { name == "protoc-gen-json-field" {
if version != "v0.0.0" { if version != "v0.0.0" {
return strings.ReplaceAll(pkgAddr, "@latest", "@"+version) return strings.ReplaceAll(pkgAddr, "@latest", "@"+version)
} }