Skip to content

Commit a385d41

Browse files
author
pixel
committed
Merge remote-tracking branch 'origin/master'
2 parents 9e6414f + 9e19684 commit a385d41

37 files changed

+5934
-2817
lines changed

.docker-compose/docker-entrypoint-initdb.d/init.sql

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ CREATE TABLE `casbin_rule` (
2929
`v3` varchar(100) DEFAULT NULL,
3030
`v4` varchar(100) DEFAULT NULL,
3131
`v5` varchar(100) DEFAULT NULL
32-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
32+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3333

3434
-- ----------------------------
3535
-- Records of casbin_rule
@@ -189,7 +189,7 @@ CREATE TABLE `exa_customers` (
189189
`sys_user_authority_id` varchar(191) DEFAULT NULL COMMENT '''管理角色ID''',
190190
PRIMARY KEY (`id`),
191191
KEY `idx_exa_customers_deleted_at` (`deleted_at`)
192-
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
192+
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
193193

194194
-- ----------------------------
195195
-- Records of exa_customers
@@ -212,7 +212,7 @@ CREATE TABLE `exa_file_chunks` (
212212
`file_chunk_path` varchar(191) DEFAULT NULL,
213213
PRIMARY KEY (`id`),
214214
KEY `idx_exa_file_chunks_deleted_at` (`deleted_at`)
215-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
215+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
216216

217217
-- ----------------------------
218218
-- Table structure for exa_file_upload_and_downloads
@@ -229,7 +229,7 @@ CREATE TABLE `exa_file_upload_and_downloads` (
229229
`key` varchar(191) DEFAULT NULL COMMENT '''编号''',
230230
PRIMARY KEY (`id`),
231231
KEY `idx_exa_file_upload_and_downloads_deleted_at` (`deleted_at`)
232-
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
232+
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
233233

234234
-- ----------------------------
235235
-- Records of exa_file_upload_and_downloads
@@ -255,7 +255,7 @@ CREATE TABLE `exa_files` (
255255
`is_finish` tinyint(1) DEFAULT NULL,
256256
PRIMARY KEY (`id`),
257257
KEY `idx_exa_files_deleted_at` (`deleted_at`)
258-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
258+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
259259

260260
-- ----------------------------
261261
-- Table structure for exa_simple_uploaders
@@ -271,7 +271,7 @@ CREATE TABLE `exa_simple_uploaders` (
271271
`total_chunks` varchar(191) DEFAULT NULL COMMENT '''切片总数''',
272272
`is_done` tinyint(1) DEFAULT NULL COMMENT '''是否上传完成''',
273273
`file_path` varchar(191) DEFAULT NULL COMMENT '''文件本地路径'''
274-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
274+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
275275

276276
-- ----------------------------
277277
-- Table structure for jwt_blacklists
@@ -285,7 +285,7 @@ CREATE TABLE `jwt_blacklists` (
285285
`jwt` text COMMENT '''jwt''',
286286
PRIMARY KEY (`id`),
287287
KEY `idx_jwt_blacklists_deleted_at` (`deleted_at`)
288-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
288+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
289289

290290
-- ----------------------------
291291
-- Table structure for sys_apis
@@ -302,7 +302,7 @@ CREATE TABLE `sys_apis` (
302302
`method` varchar(191) DEFAULT 'POST',
303303
PRIMARY KEY (`id`),
304304
KEY `idx_sys_apis_deleted_at` (`deleted_at`)
305-
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
305+
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
306306

307307
-- ----------------------------
308308
-- Records of sys_apis
@@ -387,7 +387,7 @@ CREATE TABLE `sys_authorities` (
387387
`parent_id` varchar(191) DEFAULT NULL COMMENT '''父角色ID''',
388388
PRIMARY KEY (`authority_id`),
389389
UNIQUE KEY `authority_id` (`authority_id`)
390-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
390+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
391391

392392
-- ----------------------------
393393
-- Records of sys_authorities
@@ -406,7 +406,7 @@ CREATE TABLE `sys_authority_menus` (
406406
`sys_base_menu_id` bigint unsigned NOT NULL,
407407
`sys_authority_authority_id` varchar(90) NOT NULL COMMENT '''角色ID''',
408408
PRIMARY KEY (`sys_base_menu_id`,`sys_authority_authority_id`)
409-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
409+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
410410

411411
-- ----------------------------
412412
-- Records of sys_authority_menus
@@ -481,7 +481,7 @@ CREATE TABLE `sys_base_menu_parameters` (
481481
`value` varchar(191) DEFAULT NULL,
482482
PRIMARY KEY (`id`),
483483
KEY `idx_sys_base_menu_parameters_deleted_at` (`deleted_at`)
484-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
484+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
485485

486486
-- ----------------------------
487487
-- Table structure for sys_base_menus
@@ -505,7 +505,7 @@ CREATE TABLE `sys_base_menus` (
505505
`icon` varchar(191) DEFAULT NULL COMMENT '''附加属性''',
506506
PRIMARY KEY (`id`),
507507
KEY `idx_sys_base_menus_deleted_at` (`deleted_at`)
508-
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
508+
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
509509

510510
-- ----------------------------
511511
-- Records of sys_base_menus
@@ -547,7 +547,7 @@ CREATE TABLE `sys_data_authority_ids` (
547547
`sys_authority_authority_id` varchar(90) NOT NULL COMMENT '''角色ID''',
548548
`data_authority_id_authority_id` varchar(90) NOT NULL COMMENT '''角色ID''',
549549
PRIMARY KEY (`sys_authority_authority_id`,`data_authority_id_authority_id`)
550-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
550+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
551551

552552
-- ----------------------------
553553
-- Records of sys_data_authority_ids
@@ -575,7 +575,7 @@ CREATE TABLE `sys_dictionaries` (
575575
`desc` varchar(191) DEFAULT NULL COMMENT '''描述''',
576576
PRIMARY KEY (`id`),
577577
KEY `idx_sys_dictionaries_deleted_at` (`deleted_at`)
578-
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
578+
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
579579

580580
-- ----------------------------
581581
-- Records of sys_dictionaries
@@ -605,7 +605,7 @@ CREATE TABLE `sys_dictionary_details` (
605605
`sys_dictionary_id` bigint unsigned DEFAULT NULL COMMENT '''关联标记''',
606606
PRIMARY KEY (`id`),
607607
KEY `idx_sys_dictionary_details_deleted_at` (`deleted_at`)
608-
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
608+
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
609609

610610
-- ----------------------------
611611
-- Records of sys_dictionary_details
@@ -657,7 +657,7 @@ CREATE TABLE `sys_operation_records` (
657657
`user_id` bigint unsigned DEFAULT NULL COMMENT '''''',
658658
PRIMARY KEY (`id`),
659659
KEY `idx_sys_operation_records_deleted_at` (`deleted_at`)
660-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
660+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
661661

662662
-- ----------------------------
663663
-- Table structure for sys_users
@@ -676,7 +676,7 @@ CREATE TABLE `sys_users` (
676676
`authority_id` varchar(191) DEFAULT '888' COMMENT '''用户角色ID''',
677677
PRIMARY KEY (`id`),
678678
KEY `idx_sys_users_deleted_at` (`deleted_at`)
679-
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
679+
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
680680

681681
-- ----------------------------
682682
-- Records of sys_users
@@ -703,7 +703,7 @@ CREATE TABLE `sys_workflow_step_infos` (
703703
`is_end` tinyint(1) DEFAULT NULL COMMENT '''是否是完结流节点''',
704704
PRIMARY KEY (`id`),
705705
KEY `idx_sys_workflow_step_infos_deleted_at` (`deleted_at`)
706-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
706+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
707707

708708
-- ----------------------------
709709
-- Table structure for sys_workflows
@@ -719,7 +719,7 @@ CREATE TABLE `sys_workflows` (
719719
`workflow_description` varchar(191) DEFAULT NULL COMMENT '''工作流描述''',
720720
PRIMARY KEY (`id`),
721721
KEY `idx_sys_workflows_deleted_at` (`deleted_at`)
722-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
722+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
723723

724724
-- ----------------------------
725725
-- View structure for authority_menu

.docker-compose/shell/server-handle.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,25 +69,25 @@ captcha:
6969
# zap logger configuration
7070
zap:
7171
# 可使用 "debug", "info", "warn", "error", "dpanic", "panic", "fatal",
72-
level: 'debug'
72+
level: 'info'
7373
# console: 控制台, json: json格式输出
7474
format: 'console'
7575
prefix: '[GIN-VUE-ADMIN]'
7676
director: 'log'
77-
link_name: 'latest_log'
78-
show_line: true
77+
link-name: 'latest_log'
78+
show-line: true
7979
# LowercaseLevelEncoder:小写, LowercaseColorLevelEncoder:小写带颜色,CapitalLevelEncoder: 大写, CapitalColorLevelEncoder: 大写带颜色,
80-
encode_level: 'LowercaseColorLevelEncoder'
81-
stacktrace_key: 'stacktrace'
82-
log_in_console: true
80+
encode-level: 'LowercaseColorLevelEncoder'
81+
stacktrace-key: 'stacktrace'
82+
log-in-console: true
8383
8484
email:
85-
email_from: '[email protected]'
86-
email_nick_name: 'test'
87-
email_secret: 'xxx'
88-
email_to: '[email protected]'
89-
email_host: 'smtp.163.com'
90-
email_port: 465
91-
email_isSSL: true
85+
email-from: '[email protected]'
86+
email-nickname: 'test'
87+
email-secret: 'xxx'
88+
email-to: '[email protected]'
89+
email-host: 'smtp.163.com'
90+
email-port: 465
91+
email-isSSL: true
9292
EOF
9393

README-en.md

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ We are excited that you are interested in contributing to gin-vue-admin. Before
133133
134134
- If the subnet is modified, the ipv4_address of each service needs to be modified, and the ip of the server on line 20 of [.docker-compose/nginx/conf.d/my.conf](.docker-compose/nginx/conf.d/my.conf) also needs to be modified
135135
136+
> <font color=red>**Use docker-compose to deploy this project need attention**</font>
137+
138+
- For mysql database, please use a local database installed on the server disk.
139+
- Avoid using mysql in the docker container, there may be write problems, io is lower than the host machine, docker's persistence mechanism problem
140+
- [init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql) is for docker-compose ==experience this project==, prohibit the use of [init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql) to initialize project data, Database initialization[Please use this method](https://www.gin-vue-admin.com/docs/help#step1%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%BA%93%E5%88%9D%E5%A7%8B%E5%8C%96)
141+
- Use [init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql) to initialize all problems, please bear it yourself, and have nothing to do with this project
142+
- When deploying using docker-compose of this project,Please modify the [nginx configuration](.docker-compose/nginx/conf.d/my.conf), mysql configuration, networks configuration, redis configuration corresponding to [docker-compose.yaml](./docker-compose.yaml), and make changes as needed.
143+
136144
### 2.1 Web
137145

138146
```bash
@@ -161,6 +169,47 @@ go list (go mod tidy)
161169
go build
162170
```
163171

172+
> Zap log library usage guide && configuration guide
173+
174+
The configuration of the Zap log library selects zap under [config.yaml](./server/config.yaml)
175+
176+
```yaml
177+
# zap logger configuration
178+
zap:
179+
level: 'debug'
180+
format: 'console'
181+
prefix: '[GIN-VUE-ADMIN]'
182+
director: 'log'
183+
link_name: 'latest_log'
184+
show_line: true
185+
encode_level: 'LowercaseColorLevelEncoder'
186+
stacktrace_key: 'stacktrace'
187+
log_in_console: true
188+
```
189+
190+
| Configuration Name | Type Of Configuration | Description |
191+
| ------------------ | --------------------- | ------------------------------------------------------------ |
192+
| level | string | For a detailed description of the level mode, please see the official [zap documentation](https://pkg.go.dev/go.uber.org/zap?tab=doc#pkg-constants) <br />info: info mode, stack information without errors, only output information<br />debug: debug mode, stack details with errors<br />warn:warn mode<br />error: error mode, stack details with error<br />dpanic: dpanic mode<br />panic: panic mode<br />fatal: fatal mode<br /> |
193+
| format | string | console: Output log in console format<br />json: json format output log |
194+
| prefix | string | Log prefix |
195+
| director | string | The folder to store the log can be modified, no need to create it manually |
196+
| link_name | string | [A soft connection file](https://baike.baidu.com/item/%E8%BD%AF%E9%93%BE%E6%8E%A5) of link_name will be generated in the server directory, and the link is the latest log file of the director configuration item |
197+
| show_line | bool | Display the line number, the default is true, it is not recommended to modify |
198+
| encode_level | string | LowercaseLevelEncoder: lowercase<br /> LowercaseColorLevelEncoder: lowercase with color<br />CapitalLevelEncoder: uppercase<br />CapitalColorLevelEncoder: uppercase with color |
199+
| stacktrace_key | string | The name of the stack, that is, the key of josn when outputting the log in json format |
200+
| log_in_console | bool | Whether to output to the console, the default is true |
201+
202+
- Development environment || Debug environment configuration recommendations
203+
- `level:debug`
204+
- `format:console`
205+
- `encode_level:LowercaseColorLevelEncoder`或者`encode_leve:CapitalColorLevelEncoder`
206+
- Deployment environment configuration recommendations
207+
- `level:error`
208+
- `format:json`
209+
- `encode_level: LowercaseLevelEncoder `或者 `encode_level:CapitalLevelEncoder`
210+
- `log_in_console: false`
211+
- <font color=red>Suggestions are only suggestions, you can proceed according to your own needs, and suggestions are for reference only</font>
212+
164213
### 2.3 API docs auto-generation using swagger
165214

166215
#### 2.3.1 install swagger
@@ -175,7 +224,6 @@ go get -u github.com/swaggo/swag/cmd/swag
175224
In mainland China, access to go.org/x is prohibited,we recommend [goproxy.io](https://goproxy.io/zh/)
176225

177226
````bash
178-
179227
If you are using Go version 1.13 and above (recommended)
180228
# Enable Go Modules function
181229
go env -w GO111MODULE=on
@@ -185,11 +233,8 @@ If you are using Go version 1.12 and below
185233
go env -w GO111MODULE=on
186234
go env -w GOPROXY=https://goproxy.io
187235

188-
# get swag
189-
go get -g -v github.com/swaggo/swag/cmd/swag
190-
191-
# cd GOPATH/src/github.com/swaggo/swag/cmd/swag
192-
go install
236+
# Use the following command to download swag
237+
go get -u github.com/swaggo/swag/cmd/swag
193238
````
194239

195240
#### 2.3.2 API docs generation

README.md

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ Gin-vue-admin 的成长离不开大家的支持,如果你愿意为 gin-vue-adm
129129

130130
- 如果修改了子网,对应的每个service的ipv4_address都需要修改,还有[.docker-compose/nginx/conf.d/my.conf](./.docker-compose/nginx/conf.d/my.conf)的第20行的server的ip也需要修改
131131

132+
> <font color=red>**使用docker-compose进行部署本项目需注意的问题**</font>
133+
134+
- mysql数据库请使用装在服务器磁盘的本地数据库.
135+
- 避免使用docker容器内的mysql,可能会出现写入的问题, io比宿主机低 docker的持久化机制问题
136+
- [init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql)是给docker-compose进行<font color=red>体验本项目</font>的, 禁止[init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql)使用进行项目数据的初始化, 数据库初始化[请使用此方法](https://www.gin-vue-admin.com/docs/help#step1%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%BA%93%E5%88%9D%E5%A7%8B%E5%8C%96)
137+
- 使用[init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql)进行初始化出现的所有问题,请自行承担,与本项目无关
138+
- 使用本项目的docker-compose进行部署时,请修改[docker-compose.yaml](./docker-compose.yaml)对应的[nginx配置](.docker-compose/nginx/conf.d/my.conf),mysql配置,networks配置,redis配置,按需自行更改.
139+
132140
### 2.1 web端
133141

134142
```bash
@@ -157,6 +165,47 @@ go list (go mod tidy)
157165
go build
158166
```
159167

168+
> Zap日志库使用指南&&配置指南
169+
170+
Zap日志库的配置选择在[config.yaml](./server/config.yaml)下的zap
171+
172+
```yaml
173+
# zap logger configuration
174+
zap:
175+
level: 'debug'
176+
format: 'console'
177+
prefix: '[GIN-VUE-ADMIN]'
178+
director: 'log'
179+
link_name: 'latest_log'
180+
show_line: true
181+
encode_level: 'LowercaseColorLevelEncoder'
182+
stacktrace_key: 'stacktrace'
183+
log_in_console: true
184+
```
185+
186+
| 配置名 | 配置的类型 | 说明 |
187+
| -------------- | ---------- | ------------------------------------------------------------ |
188+
| level | string | level的模式的详细说明,请看[zap官方文档](https://pkg.go.dev/go.uber.org/zap?tab=doc#pkg-constants) <br />info: info模式,无错误的堆栈信息,只输出信息<br />debug:debug模式,有错误的堆栈详细信息<br />warn:warn模式<br />error: error模式,有错误的堆栈详细信息<br />dpanic: dpanic模式<br />panic: panic模式<br />fatal: fatal模式<br /> |
189+
| format | string | console: 控制台形式输出日志<br />json: json格式输出日志 |
190+
| prefix | string | 日志的前缀 |
191+
| director | string | 存放日志的文件夹,修改即可,不需要手动创建 |
192+
| link_name | string | 在server目录下会生成一个link_name的[软连接文件](https://baike.baidu.com/item/%E8%BD%AF%E9%93%BE%E6%8E%A5),链接的是director配置项的最新日志文件 |
193+
| show_line | bool | 显示行号, 默认为true,不建议修改 |
194+
| encode_level | string | LowercaseLevelEncoder:小写<br /> LowercaseColorLevelEncoder:小写带颜色<br />CapitalLevelEncoder: 大写<br />CapitalColorLevelEncoder: 大写带颜色 |
195+
| stacktrace_key | string | 堆栈的名称,即在json格式输出日志时的josn的key |
196+
| log_in_console | bool | 是否输出到控制台,默认为true |
197+
198+
- 开发环境 || 调试环境配置建议
199+
- `level:debug`
200+
- `format:console`
201+
- `encode_level:LowercaseColorLevelEncoder`或者`encode_leve:CapitalColorLevelEncoder`
202+
- 部署环境配置建议
203+
- `level:error`
204+
- `format:json`
205+
- `encode_level: LowercaseLevelEncoder `或者 `encode_level:CapitalLevelEncoder`
206+
- `log_in_console: false`
207+
- <font color=red>建议只是建议,按照自己的需求进行即可,给出建议仅供参考</font>
208+
160209
### 2.3 swagger自动化API文档
161210

162211
#### 2.3.1 安装 swagger
@@ -177,11 +226,8 @@ go env -w GO111MODULE=on
177226
# 配置 GOPROXY 环境变量
178227
go env -w GOPROXY=https://goproxy.io,direct
179228
180-
# 执行
181-
go get -g -v github.com/swaggo/swag/cmd/swag
182-
183-
# 到GOPATH的/src/github.com/swaggo/swag/cmd/swag路径下执行
184-
go install
229+
# 使用如下命令下载swag
230+
go get -u github.com/swaggo/swag/cmd/swag
185231
```
186232

187233
#### 2.3.2 生成API文档

0 commit comments

Comments
 (0)