Skip to content

Commit fa672d0

Browse files
committed
更新文档
1 parent 5c8a701 commit fa672d0

15 files changed

Lines changed: 1011 additions & 26 deletions

File tree

docs/.vuepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ module.exports = {
120120
"/guide/v2/3.2.node",
121121
"/guide/v2/3.3.mesh",
122122
"/guide/v2/3.4.web",
123+
"/guide/v2/3.5.client",
123124
],
124125
},
125126
{

docs/guide/v2/1.1.quick-start.md

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

77
- Linux/macOS下自动安装Go多版本管理器(适用于 bash、zsh)
88

9-
```shell
9+
```bash
1010
$ curl -sSL https://raw.githubusercontent.com/voidint/g/master/install.sh | bash
1111
$ cat << 'EOF' >> ~/.bashrc
1212
# 可选。检查g别名是否被占用
@@ -19,13 +19,13 @@
1919
2020
- Windows下自动安装Go多版本管理器(适用于 pwsh)
2121
22-
```shell
22+
```bash
2323
$ iwr https://raw.githubusercontent.com/voidint/g/master/install.ps1 -useb | iex
2424
```
2525
2626
2. 安装Go编译器
2727
28-
```shell
28+
```bash
2929
$ g install 1.22.9
3030
```
3131
@@ -35,14 +35,14 @@
3535
3636
- Linux, using apt or apt-get, for example:
3737
38-
```shell
38+
```bash
3939
$ apt install -y protobuf-compiler
4040
$ protoc --version # Ensure compiler version is 3+
4141
```
4242
4343
- MacOS, using Homebrew:
4444
45-
```shell
45+
```bash
4646
$ brew install protobuf
4747
$ protoc --version # Ensure compiler version is 3+
4848
```
@@ -51,30 +51,30 @@
5151
5252
2. 安装protobuf go代码生成工具(使用场景:开发mesh微服务、使用protobuf作为与客户端通信的协议)
5353
54-
```shell
54+
```bash
5555
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
5656
```
5757
5858
3. 安装grpc代码生成工具(使用场景:使用[GRPC](https://grpc.io/)组件开发mesh微服务)
5959
60-
```shell
60+
```bash
6161
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
6262
```
6363
6464
4. 安装rpcx代码生成工具(使用场景:使用[RPCX](https://rpcx.io/)组件开发mesh微服务)
6565
66-
```shell
66+
```bash
6767
go install github.com/rpcxio/protoc-gen-rpcx@latest
6868
```
6969
7070
5. 安装gorm dao代码生成工具(使用场景:使用[GORM](https://gorm.io/)作为数据库orm)
7171
72-
```shell
72+
```bash
7373
go install github.com/dobyte/gorm-dao-generator@latest
7474
```
7575
7676
6. 安装mongo dao代码生成工具(使用场景:使用[MongoDB](https://github.com/mongodb/mongo-go-driver)作为数据库orm)
7777
78-
```shell
78+
```bash
7979
go install github.com/dobyte/mongo-dao-generator@latest
8080
```

docs/guide/v2/3.1.gate.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111

1212
[due](https://github.com/dobyte/due) 框架中,网关服(gate)采用模块化的架构思路,开发者可以根据自身的业务情况任意搭配模块化组件。
1313

14-
## 3.1.2 TCP网关
14+
## 3.1.2 TCP网关示例
1515

1616
以下完整示例详见:[gate-tcp-example](https://github.com/dobyte/due-docs/tree/master/examples/gate-tcp-example)
1717

1818
1. 创建项目
1919

20-
```shell
20+
```bash
2121
$ mkdir gate-tcp-example
2222
```
2323

2424
2. 安装依赖
2525

26-
```shell
26+
```bash
2727
$ cd gate-tcp-example
2828
$ go mod init gate-tcp-example
2929
$ go get github.com/dobyte/due/v2@v2.4.1
@@ -200,7 +200,7 @@ func main() {
200200

201201
4. 启动服务
202202

203-
```shell
203+
```bash
204204
$ cd gate-tcp-example
205205
$ go run main.go
206206
____ __ ________
@@ -227,19 +227,19 @@ $ go run main.go
227227
└──────────────────────────────────────────────────────┘
228228
```
229229

230-
## 3.1.2 WS网关
230+
## 3.1.2 WS网关示例
231231

232232
以下完整示例详见:[gate-ws-example](https://github.com/dobyte/due-docs/tree/master/examples/gate-ws-example)
233233

234234
1. 创建项目
235235

236-
```shell
236+
```bash
237237
$ mkdir gate-ws-example
238238
```
239239

240240
2. 安装依赖
241241

242-
```shell
242+
```bash
243243
$ cd gate-ws-example
244244
$ go mod init gate-ws-example
245245
$ go get github.com/dobyte/due/v2@v2.4.1
@@ -422,7 +422,7 @@ func main() {
422422

423423
5. 启动服务
424424

425-
```shell
425+
```bash
426426
$ cd gate-ws-example
427427
$ go run main.go
428428
____ __ ________

docs/guide/v2/3.2.node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424

2525
1. 创建项目
2626

27-
```shell
27+
```bash
2828
$ mkdir node-example
2929
```
3030

3131
2. 安装依赖
3232

33-
```shell
33+
```bash
3434
$ cd node-example
3535
$ go mod init node-example
3636
$ go get github.com/dobyte/due/v2@v2.4.1

docs/guide/v2/3.3.mesh.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313
1. 创建项目
1414

15-
```shell
15+
```bash
1616
$ mkdir mesh-grpc-example
1717
```
1818

1919
2. 安装依赖
2020

21-
```shell
21+
```bash
2222
$ cd mesh-grpc-example
2323
$ go mod init mesh-grpc-example
2424
$ go get github.com/dobyte/due/v2@v2.4.1
@@ -386,13 +386,13 @@ INFO[2025/10/18 13:43:48.538785] E:/workspace/dobyte/due-docs/examples/mesh-grpc
386386

387387
1. 创建项目
388388

389-
```shell
389+
```bash
390390
$ mkdir mesh-rpcx-example
391391
```
392392

393393
2. 安装依赖
394394

395-
```shell
395+
```bash
396396
$ cd mesh-rpcx-example
397397
$ go mod init mesh-rpcx-example
398398
$ go get github.com/dobyte/due/v2@v2.4.1

docs/guide/v2/3.4.web.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ $ go install github.com/swaggo/swag/cmd/swag@latest
2828

2929
1. 创建项目
3030

31-
```shell
31+
```bash
3232
$ mkdir web-example
3333
```
3434

3535
2. 安装依赖
3636

37-
```shell
37+
```bash
3838
$ cd web-example
3939
$ go mod init web-example
4040
$ go get github.com/dobyte/due/v2@v2.4.1

0 commit comments

Comments
 (0)