chore: update readme for goctl installation (#4206)

This commit is contained in:
Kevin Wan 2024-06-23 11:47:17 +08:00 committed by GitHub
parent 8d9746e794
commit 4ec9cac82b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 16 deletions

View File

@ -118,18 +118,13 @@ GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go get -u github.com/zeromicro
# For Mac # For Mac
brew install goctl brew install goctl
# docker for amd64 architecture # docker for all platforms
docker pull kevinwan/goctl docker pull kevinwan/goctl
# run goctl like # run goctl
docker run --rm -it -v `pwd`:/app kevinwan/goctl --help docker run --rm -it -v `pwd`:/app kevinwan/goctl --help
# docker for arm64(Mac) architecture
docker pull kevinwan/goctl:latest-arm64
# run goctl like
docker run --rm -it -v `pwd`:/app kevinwan/goctl:latest-arm64 goctl --help
``` ```
确保 goctl 可执行 确保 goctl 可执行,并且在 $PATH 环境变量里。
2. 快速生成 api 服务 2. 快速生成 api 服务

View File

@ -125,18 +125,13 @@ go get -u github.com/zeromicro/go-zero
# For Mac # For Mac
brew install goctl brew install goctl
# docker for amd64 architecture # docker for all platforms
docker pull kevinwan/goctl docker pull kevinwan/goctl
# run goctl like # run goctl
docker run --rm -it -v `pwd`:/app kevinwan/goctl --help docker run --rm -it -v `pwd`:/app kevinwan/goctl --help
# docker for arm64(Mac) architecture
docker pull kevinwan/goctl:latest-arm64
# run goctl like
docker run --rm -it -v `pwd`:/app kevinwan/goctl:latest-arm64 --help
``` ```
make sure goctl is executable. make sure goctl is executable and in your $PATH.
3. Create the API file, like greet.api, you can install the plugin of goctl in vs code, api syntax is supported. 3. Create the API file, like greet.api, you can install the plugin of goctl in vs code, api syntax is supported.