I've been working on a series of optimizations for go-sail lately. Today, we've officially released version 3.0.6. Everyone is welcome to try it out.
The changes in this version are as follows:
π Features
- utils: Simplified and optimized redis lock code, support custom redis client (
0166990) - schedule: Support custom redis client (
0166990) - http: Adjusted timestamp field, fixed paginator JSON tag (
0166990) - other: Updated README (
0166990) - schedule: Added crontab expression; utils: HTTP requests no longer check status code (
9be8d24) - lib: Added
NowFuncin db component (d7b1f79) - middleware: Added real client IP method (
edb4b3a) - lib: Added valkey component (
c9a53b7) - lib: nacos: Added service subscription, replaced old utils calls (
8f8e793) - lib: nacos: Added
NewConfigClientandNewNamingClientmethods (30b6307b) - sail: Added
Configto read configuration (c70b1c7e) - sail: jwt: Added
EncryptandDecryptmethods (737b694c) - sail: Added
RedisLockermethod (31c55834) - sail: Added
setterto manage redis client for redis locker and schedule (b20009a1)
π Fixes
- schedule: Fixed
CallandMustCallnil pointer issue (ebd4ea9) - api: Fixed
mergeBodyhandling for(*T)(nil)(817b93f) - api: Fixed
SendWithCodenil pointer when callingfuncBeforeWrite(f41fa8f)
π§ Changes / Improvements
- middleware: Upgraded gopsutil to v4 (
6584811) - lib: Modified jwt error messages (
3b396e4) - sail: Adjusted jwt
ValidTokenreturn parameters (2ab099e) - lib: Upgraded jwt to v5 (
5a94765) - utils: Redis lock adjusted
TryLockWithContext(c578ab4) - other: change Framework version to
3.0.6 - http: Api performance optimize (
23934799) - other: Add benchmark (
23934799)
π¦ Dependencies
- github.com/golang-jwt/jwt/v5 β 5.2.2 β 5.3.0
- github.com/shirou/gopsutil/v4 β 4.25.3 β 4.25.7
- Other deps: swag, etcd, gorm, mysql, sqlite, postgres, nats, gin, nacos, valkey, kafka, x/net
π Docs & π§ͺ Tests
- Updated README / README_EN.md / examples
- Added test cases & codecov config
- Continuous test improvements & CI/CD workflow adjustments
Benchmark
goos: darwin
goarch: amd64
pkg: github.com/keepchen/go-sail/v3
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkGoSailParallel-12 88252 12898 ns/op 8860 B/op 92 allocs/op
BenchmarkGinParallel-12 96548 11722 ns/op 7187 B/op 82 allocs/op
PASS
ok github.com/keepchen/go-sail/v3 3.663s
Repository
https://github.com/keepchen/go-sail
Documentation
Everyone is welcome to use it and experience it. If you like it, please like and collect it.

Top comments (0)