Skip to content

Commit a299c0b

Browse files
committed
feat: use jsoniter for improving gin performance
1 parent ccf548e commit a299c0b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.air.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ tmp_dir = "tmp"
77

88
[build]
99
# Just plain old shell command. You could use `make` as well.
10-
cmd = "CGO_ENABLED=1 go build -ldflags=\"-X 'github.com/0xJacky/Nginx-UI/server/settings.buildTime=$(date +%s)'\" -o ./tmp/main ."
10+
cmd = "CGO_ENABLED=1 go build -tags=jsoniter -ldflags=\"-X 'github.com/0xJacky/Nginx-UI/server/settings.buildTime=$(date +%s)'\" -o ./tmp/main ."
1111
# Binary file yields from `cmd`.
1212
bin = "tmp/main"
1313
# Customize binary.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173
- name: Build
174174
run: |
175175
mkdir -p dist
176-
go build -ldflags "$LD_FLAGS -X 'github.com/0xJacky/Nginx-UI/server/settings.buildTime=$(date +%s)'" -o dist/nginx-ui -v main.go
176+
go build -tags=jsoniter -ldflags "$LD_FLAGS -X 'github.com/0xJacky/Nginx-UI/server/settings.buildTime=$(date +%s)'" -o dist/nginx-ui -v main.go
177177
178178
- name: Archive backend artifacts
179179
uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)