Skip to content

Commit ff1a0e6

Browse files
committed
update docs
1 parent 0573c94 commit ff1a0e6

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
[![codecov](https://codecov.io/gh/zhufuyi/sponge/branch/main/graph/badge.svg)](https://codecov.io/gh/zhufuyi/sponge)
1111
[![Go Reference](https://pkg.go.dev/badge/github.com/zhufuyi/sponge.svg)](https://pkg.go.dev/github.com/zhufuyi/sponge)
1212
[![Go](https://github.com/zhufuyi/sponge/workflows/Go/badge.svg?branch=main)](https://github.com/zhufuyi/sponge/actions)
13+
[![Awesome Go](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/avelino/awesome-go)
1314
[![License: MIT](https://img.shields.io/github/license/zhufuyi/sponge)](https://img.shields.io/github/license/zhufuyi/sponge)
1415

1516
</div>
@@ -18,9 +19,9 @@
1819

1920
<br>
2021

21-
If you are developing a RESTful web or microservice with a simple CRUD API interface, you don't need to write a single line of golang code to compile and deploy to servers, dockers, k8s, and the complete service code is generated by sponge.
22+
If you are developing a RESTful web service or microservice with a simple CRUD API interface, you don't need to write a single line of golang code to compile and deploy to servers, dockers, k8s, and the complete service code is generated by sponge.
2223

23-
If you develop a generic RESTful web or microservice, you need to manually write code in addition to defining the data table, defining the api interface in the proto file, and filling in the specific business logic code in the generated template file. Other golang codes are generated by sponge.
24+
If you develop a generic RESTful web service or microservice, you need to manually write code in addition to defining the data table, defining the api interface in the proto file, and filling in the specific business logic code in the generated template file. Other golang codes are generated by sponge.
2425

2526
<br>
2627

@@ -64,7 +65,7 @@ Egg model profiling diagram for `⓷Web services created based on protobuf`:
6465
<img width="1200px" src="https://raw.githubusercontent.com/zhufuyi/sponge_examples/main/assets/en_web-http-pb-anatomy.png">
6566
</p>
6667

67-
This is the egg model for web service code, and there are egg models for microservice (grpc) code, and grpc gateway service code described in [sponge documentation](https://go-sponge.com/learn-about-sponge?id=%f0%9f%8f%b7project-code-egg-model).
68+
This is the egg model for web service code, and there are egg models for grpc service code, and grpc gateway service code described in [sponge documentation](https://go-sponge.com/learn-about-sponge?id=%f0%9f%8f%b7project-code-egg-model).
6869

6970
<br>
7071

assets/en_sponge-ui.png

14.6 KB
Loading

assets/install-cn.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@
66

77
下载go地址: [https://studygolang.com/dl](https://studygolang.com/dl)
88

9-
> 要求1.16以上版本
9+
> 建议是1.20以上版本
1010
1111
查看go版本 `go version`
1212

1313
<br>
1414

1515
**✅ 安装 protoc**
1616

17-
下载protoc地址: [https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.3](https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.3)
17+
下载protoc地址: [https://github.com/protocolbuffers/protobuf/releases/tag/v25.2](https://github.com/protocolbuffers/protobuf/releases/tag/v25.2)
1818

19-
> 要求v3.20以上版本,把 protoc 二进制文件所在目录添加到系统环境变量path
19+
> 要求v3.20以上版本,根据系统类型下载对应的 protoc 二进制文件,把 protoc 二进制文件移动到go二进制文件所在的目录
2020
2121
查看protoc版本: `protoc --version`
2222

2323
<br>
2424

2525
安装完go和protoc之后,接下来安装sponge,支持在windows、mac、linux环境安装。
2626

27-
> 如果不能科学上网,安装sponge时,获取github的库会遇到超时失败问题,建议设置为国内代理,执行命令 **go env -w GOPROXY=https://goproxy.cn,direct**
27+
> 如果不能科学上网,安装sponge时,获取github的库可能会遇到超时失败问题,建议设置为国内代理,执行命令 **go env -w GOPROXY=https://goproxy.cn,direct**
2828
2929
<br>
3030

@@ -192,10 +192,10 @@ services:
192192
- "24631:24631"
193193
```
194194
195+
启动服务:
196+
195197
```bash
196-
# 启动服务
197198
docker-compose up -d
198-
199199
```
200200

201201
在docker部署成功后,在浏览器访问 `http://你的宿主机ip:24631`

assets/install-en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
Download go from: [https://go.dev/doc/install](https://go.dev/doc/install)
88

9-
> Required version: 1.16 or above.
9+
> Recommended version: 1.20 or above.
1010
1111
Check go version: `go version`
1212

1313
<br>
1414

1515
**✅ Installing protoc**
1616

17-
Download protoc from: [https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.3](https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.3)
17+
Download protoc from: [https://github.com/protocolbuffers/protobuf/releases/tag/v25.2](https://github.com/protocolbuffers/protobuf/releases/tag/v25.2)
1818

19-
> Required version: v3.20 or above. add the directory where the protoc binaries are located to the system environment variable path.
19+
> Required version: v3.20 or above. Download the protoc binaries according to the system type, move the protoc binaries to the directory where the go binaries are located.
2020
2121
Check protoc version: `protoc --version`
2222

assets/readme-cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ sponge生成代码过程中剥离了业务逻辑与非业务逻辑两大部分
4848
<img width="1200px" src="https://raw.githubusercontent.com/zhufuyi/sponge_examples/main/assets/web-http-pb-anatomy.png">
4949
</p>
5050

51-
这是web服务代码鸡蛋模型,还有微服务(grpc)代码、grpc网关服务代码的鸡蛋模型在[sponge文档](https://go-sponge.com/zh-cn/learn-about-sponge?id=%f0%9f%8f%b7%e9%a1%b9%e7%9b%ae%e4%bb%a3%e7%a0%81%e9%b8%a1%e8%9b%8b%e6%a8%a1%e5%9e%8b)中有介绍。
51+
这是web服务代码鸡蛋模型,还有grpc服务代码、grpc网关服务代码的鸡蛋模型在[sponge文档](https://go-sponge.com/zh-cn/learn-about-sponge?id=%f0%9f%8f%b7%e9%a1%b9%e7%9b%ae%e4%bb%a3%e7%a0%81%e9%b8%a1%e8%9b%8b%e6%a8%a1%e5%9e%8b)中有介绍。
5252

5353
<br>
5454

@@ -69,7 +69,7 @@ sponge包含丰富的组件(按需使用):
6969
- 自动化api接口文档 [swagger](https://github.com/swaggo/swag), [protoc-gen-openapiv2](https://github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2)
7070
- 鉴权 [jwt](https://github.com/golang-jwt/jwt)
7171
- 校验 [validator](https://github.com/go-playground/validator)
72-
- 消息组件 [rabbitmq](github.com/rabbitmq/amqp091-go)
72+
- 消息组件 [rabbitmq](https://github.com/rabbitmq/amqp091-go)
7373
- 分布式事务管理器 [dtm](https://github.com/dtm-labs/dtm)
7474
- 自适应限流 [ratelimit](https://github.com/zhufuyi/sponge/tree/main/pkg/shield/ratelimit)
7575
- 自适应熔断 [circuitbreaker](https://github.com/zhufuyi/sponge/tree/main/pkg/shield/circuitbreaker)

assets/sponge-ui.png

15.7 KB
Loading

cmd/sponge/scripts/build-sponge-image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
TAG=$1
44
if [ "X${TAG}" = "X" ];then
5-
echo "image tag cannot be empty, example: ./image-build.sh v1.5.8"
5+
echo "image tag cannot be empty, example: ./build-sponge-image.sh v1.5.8"
66
exit 1
77
fi
88

0 commit comments

Comments
 (0)