Skip to content

Commit f305701

Browse files
committed
refactor: use zap as logger ⚡
1 parent 2831208 commit f305701

File tree

34 files changed

+327
-175
lines changed

34 files changed

+327
-175
lines changed

.air.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ full_bin = "APP_ENV=dev APP_USER=air ./tmp/main"
1515
# Watch these filename extensions.
1616
include_ext = ["go", "tpl", "tmpl", "html", "conf", "ini", "toml"]
1717
# Ignore these filename extensions or directories.
18-
exclude_dir = ["assets", "tmp", "vendor", "frontend/node_modules", "upload"]
18+
exclude_dir = ["assets", "tmp", "vendor", "frontend/node_modules", "upload", "docs", "resources"]
1919
# Watch these directories if you specified.
2020
include_dir = []
2121
# Exclude files.

frontend/src/components/StdDataDisplay/StdCurd.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ const selectedRowKeys = ref([])
189189
</template>
190190

191191
<style lang="less" scoped>
192-
.before-edit {
193-
margin-bottom: 20px;
192+
.before-edit:last-child {
193+
margin-bottom: 10px;
194194
}
195195
</style>

frontend/src/language/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ export const msg = [
3131
$gettext('Perform core upgrade error'),
3232
$gettext('Upgraded successfully'),
3333

34-
$gettext('File exists')
34+
$gettext('File exists'),
35+
$gettext('Requested with wrong parameters')
3536
]

frontend/src/language/en/app.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,10 @@ msgstr ""
10541054
msgid "Reloading nginx"
10551055
msgstr ""
10561056

1057+
#: src/language/constants.ts:35
1058+
msgid "Requested with wrong parameters"
1059+
msgstr ""
1060+
10571061
#: src/components/StdDataDisplay/StdTable.vue:10
10581062
#: src/components/StdDataDisplay/StdTable.vue:15
10591063
#: src/components/StdDataDisplay/StdTable.vue:9

frontend/src/language/messages.pot

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,10 @@ msgstr ""
10891089
msgid "Reloading nginx"
10901090
msgstr ""
10911091

1092+
#: src/language/constants.ts:35
1093+
msgid "Requested with wrong parameters"
1094+
msgstr ""
1095+
10921096
#: src/components/StdDataDisplay/StdTable.vue:10
10931097
#: src/components/StdDataDisplay/StdTable.vue:15
10941098
#: src/components/StdDataDisplay/StdTable.vue:9

frontend/src/language/translations.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

frontend/src/language/zh_CN/app.mo

67 Bytes
Binary file not shown.

frontend/src/language/zh_CN/app.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,10 @@ msgstr "重载中"
10301030
msgid "Reloading nginx"
10311031
msgstr "正在重载 Nginx"
10321032

1033+
#: src/language/constants.ts:35
1034+
msgid "Requested with wrong parameters"
1035+
msgstr "请求参数错误"
1036+
10331037
#: src/components/StdDataDisplay/StdTable.vue:10
10341038
#: src/components/StdDataDisplay/StdTable.vue:15
10351039
#: src/components/StdDataDisplay/StdTable.vue:9

frontend/src/language/zh_TW/app.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,10 @@ msgstr "换弹中"
10311031
msgid "Reloading nginx"
10321032
msgstr "重载 Nginx"
10331033

1034+
#: src/language/constants.ts:35
1035+
msgid "Requested with wrong parameters"
1036+
msgstr ""
1037+
10341038
#: src/components/StdDataDisplay/StdTable.vue:10
10351039
#: src/components/StdDataDisplay/StdTable.vue:15
10361040
#: src/components/StdDataDisplay/StdTable.vue:9

go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ require (
66
github.com/BurntSushi/toml v1.2.1
77
github.com/creack/pty v1.1.18
88
github.com/dustin/go-humanize v1.0.1
9+
github.com/fatih/color v1.13.0
910
github.com/gin-contrib/static v0.0.1
1011
github.com/gin-gonic/gin v1.9.0
1112
github.com/go-acme/lego/v4 v4.10.2
@@ -25,6 +26,7 @@ require (
2526
github.com/spf13/cast v1.5.0
2627
github.com/tufanbarisyildirim/gonginx v0.0.0-20230325082000-26dcb15a9df4
2728
github.com/unknwon/com v1.0.1
29+
go.uber.org/zap v1.24.0
2830
golang.org/x/crypto v0.8.0
2931
gopkg.in/ini.v1 v1.67.0
3032
gorm.io/driver/sqlite v1.5.0
@@ -107,6 +109,7 @@ require (
107109
github.com/liquidweb/liquidweb-cli v0.6.10 // indirect
108110
github.com/liquidweb/liquidweb-go v1.6.3 // indirect
109111
github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a // indirect
112+
github.com/mattn/go-colorable v0.1.13 // indirect
110113
github.com/mattn/go-isatty v0.0.18 // indirect
111114
github.com/mattn/go-sqlite3 v1.14.16 // indirect
112115
github.com/miekg/dns v1.1.53 // indirect
@@ -158,6 +161,8 @@ require (
158161
github.com/yandex-cloud/go-sdk v0.0.0-20230403093608-cc5174142a48 // indirect
159162
github.com/yusufpapurcu/wmi v1.2.2 // indirect
160163
go.opencensus.io v0.24.0 // indirect
164+
go.uber.org/atomic v1.11.0 // indirect
165+
go.uber.org/multierr v1.11.0 // indirect
161166
go.uber.org/ratelimit v0.2.0 // indirect
162167
golang.org/x/arch v0.3.0 // indirect
163168
golang.org/x/mod v0.10.0 // indirect

0 commit comments

Comments
 (0)