From 37a5963cd64d26e46cf4eff676739faf97962dcb Mon Sep 17 00:00:00 2001 From: wenjianzhang Date: Tue, 1 Aug 2023 22:38:41 +0800 Subject: [PATCH] =?UTF-8?q?perf=F0=9F=91=8C:=20Optimize=20go=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/issue-labeled.yml | 4 +-- .gitignore | 1 - README.md | 2 +- app/admin/apis/go_admin.go | 2 +- app/admin/models/casbin_rule.go | 1 - app/admin/models/initdb.go | 2 +- app/admin/models/sys_api.go | 6 ++--- app/admin/models/sys_config.go | 2 +- app/admin/models/sys_dept.go | 4 +-- app/admin/models/sys_dict_data.go | 2 +- app/admin/models/sys_dict_type.go | 2 +- app/admin/models/sys_login_log.go | 2 +- app/admin/models/sys_menu.go | 2 +- app/admin/models/sys_opera_log.go | 2 +- app/admin/models/sys_post.go | 4 +-- app/admin/models/sys_role.go | 2 +- app/admin/models/sys_user.go | 4 +-- app/admin/router/router.go | 3 +-- app/admin/service/sys_dept.go | 2 +- app/jobs/examples.go | 4 ++- app/jobs/jobbase.go | 22 ++++++++--------- app/jobs/models/sys_job.go | 4 +-- app/jobs/type.go | 4 +-- app/other/apis/file.go | 4 +-- app/other/apis/sys_server_monitor.go | 27 ++++++++++----------- app/other/apis/tools/db_columns.go | 2 +- app/other/apis/tools/db_tables.go | 2 +- app/other/models/tools/sys_columns.go | 2 +- app/other/models/tools/sys_tables.go | 2 +- cmd/api/server.go | 10 ++++---- cmd/migrate/migration/models/casbin_rule.go | 2 +- cmd/migrate/migration/models/role_dept.go | 1 - cmd/migrate/migration/models/sys_user.go | 2 +- common/apis/api.go | 14 +++++------ common/database/open.go | 1 - common/ip.go | 6 ++--- common/middleware/handler/auth.go | 4 +-- common/middleware/handler/user.go | 2 +- common/middleware/trace.go | 2 +- common/response/binding.go | 2 +- 41 files changed, 83 insertions(+), 87 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 48e8d022c..049421b9e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -62,5 +62,5 @@ Describe changes from the user side, and list all potential break changes or oth - [ ] Doc is updated/provided or not needed - [ ] Demo is updated/provided or not needed -- [ ] TypeScript definition is updated/provided or not needed +- [ ] TypeScript's definition is updated/provided or not needed - [ ] Changelog is provided or not needed diff --git a/.github/workflows/issue-labeled.yml b/.github/workflows/issue-labeled.yml index ce93c035a..5211d3e9b 100644 --- a/.github/workflows/issue-labeled.yml +++ b/.github/workflows/issue-labeled.yml @@ -46,8 +46,8 @@ jobs: token: ${{ secrets.ADMIN_TOKEN }} issue-number: ${{ github.event.issue.number }} body: | - Hello @${{ github.event.issue.user.login }}, we use GitHub issues to trace bugs or discuss plans of Ant Design. So, please [don't ask usage questions](https://github.com/ant-design/ant-design/issues/2320) here. You can try to open a new discussion in [antd discussions](https://github.com/ant-design/ant-design/discussions), select `Q&A` to ask questions, also can ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/antd) or [Segment Fault](https://segmentfault.com/t/antd), then apply tag `antd` and `react` to your question. - 你好 @${{ github.event.issue.user.login }},go-admin Issue 板块是用于 bug 反馈与需求讨论的地方。请[勿询问如何使用的问题](https://github.com/go-admin-te/ant-design/issues/699),你可以试着在 [antd discussions](https://github.com/ant-design/ant-design/discussions) 新开一个 discussion,选择 `Q&A` 类别进行提问,也可以在 [Stack Overflow](http://stackoverflow.com/questions/tagged/antd) 或者 [Segment Fault](https://segmentfault.com/t/antd) 中提问(记得添加 `antd` 和 `react` 标签哦~)。 + Hello @${{ github.event.issue.user.login }}, we use GitHub issues to trace bugs or discuss plans of Ant Design. So, please [don't ask usage questions](https://github.com/ant-design/ant-design/issues/2320) here. You can try to open a new discussion in [antd discussions](https://github.com/ant-design/ant-design/discussions), select `Q&A` to ask questions, also can ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/antd) or [Segment Fault](https://segmentfault.com/t/antd), then apply tag `antd` and `react` to your question. + 你好 @${{ github.event.issue.user.login }},go-admin Issue 板块是用于 bug 反馈与需求讨论的地方。请[勿询问如何使用的问题](https://github.com/go-admin-te/ant-design/issues/699),你可以试着在 [antd discussions](https://github.com/ant-design/ant-design/discussions) 新开一个 discussion,选择 `Q&A` 类别进行提问,也可以在 [Stack Overflow](https://stackoverflow.com/questions/tagged/antd) 或者 [Segment Fault](https://segmentfault.com/t/antd) 中提问(记得添加 `antd` 和 `react` 标签哦~)。 - name: 3.x if: github.event.label.name == '3.x' uses: actions-cool/issues-helper@v3 diff --git a/.gitignore b/.gitignore index 4cc42051b..24cb16d50 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,6 @@ config/settings.dev.yml.log config/settings.b.dev.yml cmd/migrate/migration/version-local/* !cmd/migrate/migration/version-local/doc.go -*/.DS_Store # go sum go.sum diff --git a/README.md b/README.md index 5660f6230..52afc9c05 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ vi ./config/settings.yml # 2. Confirm the log path ``` -:::tip ⚠️Note that this problem will occur if CGO is not installed in the windows environment; +:::tip ⚠️Note that this problem will occur if CGO is not installed in the windows10+ environment; ```bash E:\go-admin>go build diff --git a/app/admin/apis/go_admin.go b/app/admin/apis/go_admin.go index 6fa8a1624..14a06dc3b 100644 --- a/app/admin/apis/go_admin.go +++ b/app/admin/apis/go_admin.go @@ -17,7 +17,7 @@ body{ overflow-y:hidden } - +