From a3331c0c30e499cb8fd8784f17e5b31df331c5f2 Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Mon, 3 Mar 2025 16:11:37 +0800 Subject: [PATCH 01/20] chore(example): update examples/simple --- examples/simple/.gitignore | 4 + examples/simple/data.db | Bin 90112 -> 0 bytes examples/simple/go.mod | 73 ++++++++----- examples/simple/go.sum | 214 ++++++++++++++++++++++++++----------- 4 files changed, 200 insertions(+), 91 deletions(-) create mode 100644 examples/simple/.gitignore delete mode 100644 examples/simple/data.db diff --git a/examples/simple/.gitignore b/examples/simple/.gitignore new file mode 100644 index 0000000..84471e6 --- /dev/null +++ b/examples/simple/.gitignore @@ -0,0 +1,4 @@ +logs +*.tmp +*.log +data.db diff --git a/examples/simple/data.db b/examples/simple/data.db deleted file mode 100644 index c66de025930e054b638cd11da790655c4105c09c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 90112 zcmeI*J#X7a7{GBcu|&VgcKi~eLjigVQ6qp6bSi?xO^r0Do1|`rCJSGzt1CnjWr}j_ zZfekep6(s{3A%OY)}>#dK*o}^PIq)fX)D^pUw{>ncgN?s-@PaY5B~bAqjoCXZ{wsJ zrtZDkM$NKn4_&ubt8HdKx3eGl%C8sXMfR_yeXjbrS-boFS#$keZD--Aw)TAe*XHld zVD+!n{>rMZ`b_{#px{=D(f{;>W>{i43T@N-s`7Xk?U&jg|!+xghBM)h{D zB`(^n3x7Be$-qBJM3{<}AEw3i?MKIl2QLoYCr>{+{KgHY)eGEbPu-xX9oz|2`@oB~ zr^gufTY8M0su-$XIfi!Mi?*i6Xo-%{`mtRVL)9zC(C&ND=JXh{uhC`E`>m=Ns$MyU zcHfI`O^+e_I*zef6+_i4$I$M3qgU&;<2csatu%}}qDZ=U+ZaFf#lfdXhjJ|4JK1mt zZYnO)y~(gfm-3GG;A?flG;s3)PTO6v7sz_$yNT$A$!qznIBAI_aNE69oQh;G(D1b< z^}?Li7L_Iq2Mvdm2MAQ^1KWJ@k zBC2IYB3gwkk<~eg$YG2w%ZW7SCZbwaB%)Qw5?Ps(h)g?7%ZaScO+>YCwG)8(tBapdtbE*A#bLdmDUTyyQd{1i_< z6%pj^Zk$b3d69^dY?1nELm1!C)?{#XOSXtREx&xHC*EAU(-rA=@nnw~CT-a`Pt*@j zMK9Y*t~Q`VoDIbw)iO}I$Z`93HYbrJ@kCKu&1$EbvO9gU)Nr18Rl8Gpr2PHz_42uG zI}diP(Fc?5D%+&mNm49`sqHKFoj|;r>#*Dafjz*WNy*)Fo zYB43QR_LAAXT+5WhN+6%m>E~Km=aej^v)M%#FYu^aqBbVsuok?YK7kU%^7jk3{(AG zm>E~Km=aej^nU1DwzIoy{rFL_@YVCxryJu)<1IxM$n8X1kolt3_k)v8J6piM+Gx`F zwdlzOJxKHaVot8&VR9nB-GhE7O!HH&EETz2!1fB*srAbfB*srAb Date: Mon, 3 Mar 2025 16:12:59 +0800 Subject: [PATCH 02/20] chore(example): update examples/demo --- examples/demo/go.mod | 73 +++++++++------ examples/demo/go.sum | 214 ++++++++++++++++++++++++++++++------------- 2 files changed, 196 insertions(+), 91 deletions(-) diff --git a/examples/demo/go.mod b/examples/demo/go.mod index af4f66a..0efcd2b 100644 --- a/examples/demo/go.mod +++ b/examples/demo/go.mod @@ -3,7 +3,7 @@ module demo go 1.23.4 require ( - github.com/forbearing/golib v0.2.2 + github.com/forbearing/golib v0.3.3 github.com/gin-gonic/gin v1.10.0 github.com/pkg/errors v0.9.1 go.uber.org/zap v1.27.0 @@ -12,42 +12,50 @@ require ( require ( filippo.io/edwards25519 v1.1.0 // indirect + github.com/ClickHouse/ch-go v0.61.5 // indirect + github.com/ClickHouse/clickhouse-go/v2 v2.23.2 // indirect + github.com/andybalholm/brotli v1.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect - github.com/bytedance/sonic v1.12.6 // indirect - github.com/bytedance/sonic/loader v0.2.1 // indirect + github.com/bytedance/sonic v1.12.7 // indirect + github.com/bytedance/sonic/loader v0.2.2 // indirect github.com/casbin/casbin/v2 v2.103.0 // indirect github.com/casbin/gorm-adapter/v3 v3.32.0 // indirect github.com/casbin/govaluate v1.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cloudwego/base64x v0.1.4 // indirect - github.com/cloudwego/iasm v0.2.0 // indirect github.com/cloverstd/tcping v0.1.1 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/creasty/defaults v1.8.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/didip/tollbooth/v7 v7.0.2 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/eclipse/paho.mqtt.golang v1.5.0 // indirect - github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect - github.com/elastic/go-elasticsearch/v8 v8.17.0 // indirect + github.com/elastic/elastic-transport-go/v8 v8.6.1 // indirect + github.com/elastic/go-elasticsearch/v8 v8.17.1 // indirect github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/gabriel-vasile/mimetype v1.4.8 // indirect github.com/gertd/go-pluralize v0.2.1 // indirect - github.com/gin-contrib/gzip v1.1.0 // indirect - github.com/gin-contrib/sse v0.1.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/gin-contrib/gzip v1.2.2 // indirect + github.com/gin-contrib/sse v1.0.0 // indirect github.com/gin-contrib/zap v1.1.4 // indirect github.com/glebarez/go-sqlite v1.22.0 // indirect github.com/glebarez/sqlite v1.11.0 // indirect + github.com/go-faster/city v1.0.1 // indirect + github.com/go-faster/errors v0.7.1 // indirect github.com/go-ini/ini v1.67.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ping/ping v1.2.0 // indirect - github.com/go-pkgz/expirable-cache/v3 v3.0.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.23.0 // indirect + github.com/go-playground/validator/v10 v10.24.0 // indirect github.com/go-redis/redis/v8 v8.11.5 // indirect github.com/go-sql-driver/mysql v1.8.1 // indirect - github.com/goccy/go-json v0.10.4 // indirect + github.com/goccy/go-json v0.10.5 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect @@ -56,6 +64,7 @@ require ( github.com/gorilla/schema v1.4.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/h2non/filetype v1.1.3 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hhrutter/lzw v1.0.0 // indirect @@ -70,14 +79,17 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.11 // indirect github.com/klauspost/cpuid/v2 v2.2.9 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mattn/go-sqlite3 v1.14.24 // indirect github.com/microsoft/go-mssqldb v1.7.2 // indirect + github.com/minio/crc64nvme v1.0.1 // indirect github.com/minio/md5-simd v1.1.2 // indirect - github.com/minio/minio-go/v7 v7.0.83 // indirect + github.com/minio/minio-go/v7 v7.0.87 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -85,18 +97,24 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/ncruces/go-strftime v0.1.9 // indirect github.com/orcaman/concurrent-map/v2 v2.0.1 // indirect + github.com/paulmach/orb v0.11.1 // indirect github.com/pdfcpu/pdfcpu v0.9.1 // indirect github.com/pelletier/go-toml/v2 v2.2.3 // indirect - github.com/prometheus/client_golang v1.20.5 // indirect + github.com/pierrec/lz4/v4 v4.1.21 // indirect + github.com/prometheus/client_golang v1.21.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.62.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rivo/uniseg v0.4.7 // indirect + github.com/robfig/cron/v3 v3.0.1 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/rs/xid v1.6.0 // indirect github.com/sagikazarmark/locafero v0.6.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/segmentio/asm v1.2.0 // indirect github.com/segmentio/ksuid v1.0.4 // indirect + github.com/shopspring/decimal v1.4.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect @@ -105,7 +123,7 @@ require ( github.com/spf13/viper v1.19.0 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect - github.com/sunshineplan/imgconv v1.1.12 // indirect + github.com/sunshineplan/imgconv v1.1.13 // indirect github.com/sunshineplan/pdf v1.0.7 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect @@ -113,25 +131,26 @@ require ( github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect - go.mongodb.org/mongo-driver/v2 v2.0.0 // indirect + go.mongodb.org/mongo-driver/v2 v2.0.1 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect go.opentelemetry.io/otel/trace v1.28.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/arch v0.12.0 // indirect - golang.org/x/crypto v0.32.0 // indirect - golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect - golang.org/x/image v0.22.0 // indirect - golang.org/x/net v0.34.0 // indirect - golang.org/x/sync v0.10.0 // indirect - golang.org/x/sys v0.29.0 // indirect - golang.org/x/text v0.21.0 // indirect - golang.org/x/time v0.9.0 // indirect - google.golang.org/protobuf v1.36.1 // indirect + golang.org/x/arch v0.13.0 // indirect + golang.org/x/crypto v0.35.0 // indirect + golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa // indirect + golang.org/x/image v0.23.0 // indirect + golang.org/x/net v0.35.0 // indirect + golang.org/x/sync v0.11.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/text v0.22.0 // indirect + golang.org/x/time v0.10.0 // indirect + google.golang.org/protobuf v1.36.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gorm.io/driver/clickhouse v0.6.1 // indirect gorm.io/driver/mysql v1.5.7 // indirect gorm.io/driver/postgres v1.5.11 // indirect gorm.io/driver/sqlite v1.5.7 // indirect diff --git a/examples/demo/go.sum b/examples/demo/go.sum index 04cec52..ed58ccc 100644 --- a/examples/demo/go.sum +++ b/examples/demo/go.sum @@ -1,5 +1,6 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +github.com/Azure/azure-sdk-for-go v56.3.0+incompatible h1:DmhwMrUIvpeoTDiWRDtNHqelNUd3Og8JCkrLHQK795c= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ= @@ -17,6 +18,12 @@ github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/ClickHouse/ch-go v0.61.5 h1:zwR8QbYI0tsMiEcze/uIMK+Tz1D3XZXLdNrlaOpeEI4= +github.com/ClickHouse/ch-go v0.61.5/go.mod h1:s1LJW/F/LcFs5HJnuogFMta50kKDO0lf9zzfrbl0RQg= +github.com/ClickHouse/clickhouse-go/v2 v2.23.2 h1:+DAKPMnxLS7pduQZsrJc8OhdLS2L9MfDEJ2TS+hpYDM= +github.com/ClickHouse/clickhouse-go/v2 v2.23.2/go.mod h1:aNap51J1OM3yxQJRgM+AlP/MPkGBCL8A74uQThoQhR0= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhPwqqXc4/vE0f7GvRjuAsbW+HOIe8KnA= github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -24,11 +31,11 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q= github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= -github.com/bytedance/sonic v1.12.6 h1:/isNmCUF2x3Sh8RAp/4mh4ZGkcFAX/hLrzrK3AvpRzk= -github.com/bytedance/sonic v1.12.6/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= +github.com/bytedance/sonic v1.12.7 h1:CQU8pxOy9HToxhndH0Kx/S1qU/CuS9GnKYrGioDcU1Q= +github.com/bytedance/sonic v1.12.7/go.mod h1:tnbal4mxOMju17EGfknm2XyYcpyCnIROYOEYuemj13I= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.1 h1:1GgorWTqf12TA8mma4DDSbaQigE2wOgQo7iCjjJv3+E= -github.com/bytedance/sonic/loader v0.2.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.2 h1:jxAJuN9fOot/cyz5Q6dUuMJF5OqQ6+5GfA8FjjQ0R4o= +github.com/bytedance/sonic/loader v0.2.2/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/casbin/casbin/v2 v2.103.0 h1:dHElatNXNrr8XcseUov0ZSiWjauwmZZE6YMV3eU1yic= github.com/casbin/casbin/v2 v2.103.0/go.mod h1:Ee33aqGrmES+GNL17L0h9X28wXuo829wnNUnS0edAco= github.com/casbin/gorm-adapter/v3 v3.32.0 h1:Au+IOILBIE9clox5BJhI2nA3p9t7Ep1ePlupdGbGfus= @@ -39,30 +46,36 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cloverstd/tcping v0.1.1 h1:3Yp9nvSDI7Z63zoVQDJzVk1PUczrF9tJoOrKGV30iOk= github.com/cloverstd/tcping v0.1.1/go.mod h1:NYXTrTDwlwuOKQ0vwksUVUbIr0sxDDsf1J6aFpScCBo= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creasty/defaults v1.8.0 h1:z27FJxCAa0JKt3utc0sCImAEb+spPucmKoOdLHvHYKk= +github.com/creasty/defaults v1.8.0/go.mod h1:iGzKe6pbEHnpMPtfDXZEr0NVxWnPTjb1bbDy08fPzYM= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/didip/tollbooth/v7 v7.0.2 h1:WYEfusYI6g64cN0qbZgekDrYfuYBZjUZd5+RlWi69p4= -github.com/didip/tollbooth/v7 v7.0.2/go.mod h1:RtRYfEmFGX70+ike5kSndSvLtQ3+F2EAmTI4Un/VXNc= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/eclipse/paho.mqtt.golang v1.5.0 h1:EH+bUVJNgttidWFkLLVKaQPGmkTUfQQqjOsyvMGvD6o= github.com/eclipse/paho.mqtt.golang v1.5.0/go.mod h1:du/2qNQVqJf/Sqs4MEL77kR8QTqANF7XU7Fk0aOTAgk= -github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA= -github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= -github.com/elastic/go-elasticsearch/v8 v8.17.0 h1:e9cWksE/Fr7urDRmGPGp47Nsp4/mvNOrU8As1l2HQQ0= -github.com/elastic/go-elasticsearch/v8 v8.17.0/go.mod h1:lGMlgKIbYoRvay3xWBeKahAiJOgmFDsjZC39nmO3H64= -github.com/forbearing/golib v0.2.2 h1:fClPnWJ0TOki7pOpNT+zxrKGp/Fqj/djcOHI4n7sofg= -github.com/forbearing/golib v0.2.2/go.mod h1:LIpmsfZA9QVSarl0+AYYtdMWkZL8QaqwximR2ZIqvpo= +github.com/elastic/elastic-transport-go/v8 v8.6.1 h1:h2jQRqH6eLGiBSN4eZbQnJLtL4bC5b4lfVFRjw2R4e4= +github.com/elastic/elastic-transport-go/v8 v8.6.1/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= +github.com/elastic/go-elasticsearch/v8 v8.17.1 h1:bOXChDoCMB4TIwwGqKd031U8OXssmWLT3UrAr9EGs3Q= +github.com/elastic/go-elasticsearch/v8 v8.17.1/go.mod h1:MVJCtL+gJJ7x5jFeUmA20O7rvipX8GcQmo5iBcmaJn4= +github.com/forbearing/golib v0.3.3 h1:4wX2x1XGLXMvpcmuGR7vnNFuppYdOROUF8ngzvG05OY= +github.com/forbearing/golib v0.3.3/go.mod h1:6ulp3rY5dJX9iojEjITVX5kWtlfuX2Xe9eGNr8+GSGo= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= @@ -71,10 +84,12 @@ github.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3G github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8= github.com/gertd/go-pluralize v0.2.1 h1:M3uASbVjMnTsPb0PNqg+E/24Vwigyo/tvyMTtAlLgiA= github.com/gertd/go-pluralize v0.2.1/go.mod h1:rbYaKDbsXxmRfr8uygAEKhOWsjyrrqrkHVpZvoOp8zk= -github.com/gin-contrib/gzip v1.1.0 h1:kVw7Nr9M+Z6Ch4qo7aGMbiqxDeyQFru+07MgAcUF62M= -github.com/gin-contrib/gzip v1.1.0/go.mod h1:iHJXCup4CWiKyPUEl+GwkHjchl+YyYuMKbOCiXujPIA= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/gin-contrib/gzip v1.2.2 h1:iUU/EYCM8ENfkjmZaVrxbjF/ZC267Iqv5S0MMCMEliI= +github.com/gin-contrib/gzip v1.2.2/go.mod h1:C1a5cacjlDsS20cKnHlZRCPUu57D3qH6B2pV0rl+Y/s= +github.com/gin-contrib/sse v1.0.0 h1:y3bT1mUWUxDpW4JLQg/HnTqV4rozuW4tC9eFKTxYI9E= +github.com/gin-contrib/sse v1.0.0/go.mod h1:zNuFdwarAygJBht0NTKiSi3jRf6RbqeILZ9Sp6Slhe0= github.com/gin-contrib/zap v1.1.4 h1:xvxTybg6XBdNtcQLH3Tf0lFr4vhDkwzgLLrIGlNTqIo= github.com/gin-contrib/zap v1.1.4/go.mod h1:7lgEpe91kLbeJkwBTPgtVBy4zMa6oSBEcvj662diqKQ= github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= @@ -83,6 +98,12 @@ github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc= github.com/glebarez/sqlite v1.11.0 h1:wSG0irqzP6VurnMEpFGer5Li19RpIRi2qvQz++w0GMw= github.com/glebarez/sqlite v1.11.0/go.mod h1:h8/o8j5wiAsqSPoWELDUdJXhjAhsVliSn7bWZjOhrgQ= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= +github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw= +github.com/go-faster/errors v0.7.1 h1:MkJTnDoEdi9pDabt1dpWf7AA8/BaSYZqibYyhZ20AYg= +github.com/go-faster/errors v0.7.1/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo= github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -92,23 +113,23 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ping/ping v1.2.0 h1:vsJ8slZBZAXNCK4dPcI2PEE9eM9n9RbXbGouVQ/Y4yQ= github.com/go-ping/ping v1.2.0/go.mod h1:xIFjORFzTxqIV/tDVGO4eDy/bLuSyawEeojSm3GfRGk= -github.com/go-pkgz/expirable-cache/v3 v3.0.0 h1:u3/gcu3sabLYiTCevoRKv+WzjIn5oo7P8XtiXBeRDLw= -github.com/go-pkgz/expirable-cache/v3 v3.0.0/go.mod h1:2OQiDyEGQalYecLWmXprm3maPXeVb5/6/X7yRPYTzec= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.23.0 h1:/PwmTwZhS0dPkav3cdK9kV1FsAmrL8sThn8IHr/sO+o= -github.com/go-playground/validator/v10 v10.23.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= +github.com/go-playground/validator/v10 v10.24.0 h1:KHQckvo8G6hlWnrPX4NJJ+aBfWNAE/HH+qdL2cBpCmg= +github.com/go-playground/validator/v10 v10.24.0/go.mod h1:GGzBIJMuE98Ic/kJsBXbz1x/7cByt++cQ+YOuDM5wus= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= -github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM= -github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= +github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= @@ -117,10 +138,15 @@ github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0kt github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= -github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -141,6 +167,8 @@ github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -171,6 +199,9 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -178,8 +209,11 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= @@ -200,10 +234,12 @@ github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBW github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/microsoft/go-mssqldb v1.7.2 h1:CHkFJiObW7ItKTJfHo1QX7QBBD1iV+mn1eOyRP3b/PA= github.com/microsoft/go-mssqldb v1.7.2/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA= +github.com/minio/crc64nvme v1.0.1 h1:DHQPrYPdqK7jQG/Ls5CTBZWeex/2FMS3G5XGkycuFrY= +github.com/minio/crc64nvme v1.0.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.83 h1:W4Kokksvlz3OKf3OqIlzDNKd4MERlC2oN8YptwJ0+GA= -github.com/minio/minio-go/v7 v7.0.83/go.mod h1:57YXpvc5l3rjPdhqNrDsvVlY0qPI6UTk1bflAe+9doY= +github.com/minio/minio-go/v7 v7.0.87 h1:nkr9x0u53PespfxfUqxP3UYWiE2a41gaofgNnC4Y8WQ= +github.com/minio/minio-go/v7 v7.0.87/go.mod h1:33+O8h0tO7pCeCWwBVa07RhVVfB/3vS4kEX7rwYKmIg= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -212,6 +248,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mssola/useragent v1.0.0 h1:WRlDpXyxHDNfvZaPEut5Biveq86Ze4o4EMffyMxmH5o= github.com/mssola/useragent v1.0.0/go.mod h1:hz9Cqz4RXusgg1EdI4Al0INR62kP7aPSRNHnpU+b85Y= @@ -223,28 +260,36 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.24.2 h1:J/tulyYK6JwBldPViHJReihxxZ+22FHs0piGjQAvoUE= +github.com/onsi/gomega v1.24.2/go.mod h1:gs3J10IS7Z7r7eXRoNJIrNqU4ToQukCJhFtKrWgHWnk= github.com/orcaman/concurrent-map/v2 v2.0.1 h1:jOJ5Pg2w1oeB6PeDurIYf6k9PQ+aTITr/6lP/L/zp6c= github.com/orcaman/concurrent-map/v2 v2.0.1/go.mod h1:9Eq3TG2oBe5FirmYWQfYO5iH1q0Jv47PLaNK++uCdOM= +github.com/paulmach/orb v0.11.1 h1:3koVegMC4X/WeiXYz9iswopaTwMem53NzTJuTF20JzU= +github.com/paulmach/orb v0.11.1/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= +github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= github.com/pdfcpu/pdfcpu v0.9.1 h1:q8/KlBdHjkE7ZJU4ofhKG5Rjf7M6L324CVM6BMDySao= github.com/pdfcpu/pdfcpu v0.9.1/go.mod h1:fVfOloBzs2+W2VJCCbq60XIxc3yJHAZ0Gahv1oO0gyI= github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= +github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= -github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.21.0 h1:DIsaGmiaBkSangBgMtWdNfxbMNdku5IK6iNhrEqWvdA= +github.com/prometheus/client_golang v1.21.0/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= +github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= @@ -252,16 +297,23 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qq github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= +github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3N51bwOk= github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= +github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c= github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= +github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= @@ -279,8 +331,10 @@ github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8w github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -290,31 +344,38 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/sunshineplan/imgconv v1.1.12 h1:GWw7OTB12ta5GwEpagyrPG+dl4zn9zJvFG2UHaAcrT0= -github.com/sunshineplan/imgconv v1.1.12/go.mod h1:CdbeWhsvMbwvXrzyRfDSHWqqghdx4sQVREU3GQ84/kI= +github.com/sunshineplan/imgconv v1.1.13 h1:XGBE1pIpCnr9AezZPdNyH+UYlWcHr2exyyNTQhVv83U= +github.com/sunshineplan/imgconv v1.1.13/go.mod h1:Y9xOzUU+4OKgc8hkvt9Dr12VUlfZ9HLox8RAnhJQQd8= github.com/sunshineplan/pdf v1.0.7 h1:62xlc079jh4tGLDjiihyyhwVFkn0IsxLyDpHplbG9Ew= github.com/sunshineplan/pdf v1.0.7/go.mod h1:QsEmZCWBE3uFK8PCrM0pua1WDWLNU77YusiDEcY56OQ= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM= github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver/v2 v2.0.0 h1:Jfd7XpdZa9yk3eY774bO7SWVb30noLSirL9nKTpavhI= -go.mongodb.org/mongo-driver/v2 v2.0.0/go.mod h1:nSjmNq4JUstE8IRZKTktLgMHM4F1fccL6HGX1yh+8RA= +go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= +go.mongodb.org/mongo-driver/v2 v2.0.1 h1:mhB/ZJkLSv6W6LGzY7sEjpZif47+JdfEEXjlLCIv7Qc= +go.mongodb.org/mongo-driver/v2 v2.0.1/go.mod h1:w7iFnTcQDMXtdXwcvyG3xljYpoBa1ErkI0yOzbkZ9b8= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= -go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= -go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -323,10 +384,13 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -golang.org/x/arch v0.12.0 h1:UsYJhbzPYGsT0HbEdmYcqtCv8UNGvnaL561NnIUvaKg= -golang.org/x/arch v0.12.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/arch v0.13.0 h1:KCkqVVV1kGg0X87TFysjCJ8MxtZEIU4Ja/yXGeoECdA= +golang.org/x/arch v0.13.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= @@ -334,21 +398,27 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f h1:XdNn9LlyWAhLVp6P/i8QYBW+hlyhrhei9uErw2B5GJo= -golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:D5SMRVC3C2/4+F/DB1wZsLRnSNimn2Sp/NPsCrsv8ak= -golang.org/x/image v0.22.0 h1:UtK5yLUzilVrkjMAZAZ34DXGpASN8i8pj8g+O+yd10g= -golang.org/x/image v0.22.0/go.mod h1:9hPFhljd4zZ1GNSIZJ49sqbp45GKK9t6w+iXvGqZUz4= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa h1:t2QcU6V556bFjYgu4L6C+6VrCPyJZ+eyRsABUPs1mz4= +golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk= +golang.org/x/image v0.23.0 h1:HseQ7c2OpPKTPVzNjG5fwJsOTCiiwS4QdsYi5XU6H68= +golang.org/x/image v0.23.0/go.mod h1:wJJBTdLfCCf3tiHa1fNxpZmUI4mmoZvwMCPP0ddoNKY= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= +golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -359,17 +429,22 @@ golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= -golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= +golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -384,8 +459,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -398,6 +473,7 @@ golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= @@ -407,21 +483,29 @@ golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= +golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= -golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= +golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= +golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= -google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.36.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU= +google.golang.org/protobuf v1.36.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= @@ -438,6 +522,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/clickhouse v0.6.1 h1:t7JMB6sLBXxN8hEO6RdzCbJCwq/jAEVZdwXlmQs1Sd4= +gorm.io/driver/clickhouse v0.6.1/go.mod h1:riMYpJcGZ3sJ/OAZZ1rEP1j/Y0H6cByOAnwz7fo2AyM= gorm.io/driver/mysql v1.5.7 h1:MndhOPYOfEp2rHKgkZIhJ16eVUIRf2HmzgoPmh7FCWo= gorm.io/driver/mysql v1.5.7/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM= gorm.io/driver/postgres v1.5.11 h1:ubBVAfbKEUld/twyKZ0IYn9rSQh448EdelLYk9Mv314= From 70e9d31ef86cb178ef8f2be686c2d6b7e9d99e0f Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Mon, 3 Mar 2025 16:14:14 +0800 Subject: [PATCH 03/20] docs: update README.md --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index 282e329..88e0b00 100644 --- a/README.md +++ b/README.md @@ -243,11 +243,3 @@ type ESDocumenter interface { GetID() string } ``` - -## TODO - -- [ ] Use reflect caching to optimizeize performance -- [ ] Configuration `config/config.go` supports multiple instances, including MySQL, PostgresSQL, Elastic, Elasticsearch, MongoDB, etc. -- [ ] Add `ldap` package and integrate it into `boostrap.Boostrap` -- [ ] Controler layer utilizes github.com/araddon/dateparse to handle arbitrary date time formats. -- [ ] Add more middleware From f91946012bed87f6c6e4fd1106ca27ccddffdff9 Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Mon, 3 Mar 2025 17:19:00 +0800 Subject: [PATCH 04/20] chore: ignore docs --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 96e69ec..769099f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ rsync.sh TODO .dccache *.db +docs From 8b70bbf6fa0f1071b222d94997bfd193aec49a7f Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Mon, 3 Mar 2025 17:21:12 +0800 Subject: [PATCH 05/20] feat(bootstrap): add Run to boostrap server --- bootstrap/bootstrap.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bootstrap/bootstrap.go b/bootstrap/bootstrap.go index 4b17f86..035717e 100644 --- a/bootstrap/bootstrap.go +++ b/bootstrap/bootstrap.go @@ -12,6 +12,7 @@ import ( "github.com/forbearing/golib/database/redis" "github.com/forbearing/golib/database/sqlite" "github.com/forbearing/golib/database/sqlserver" + "github.com/forbearing/golib/debug/statsviz" "github.com/forbearing/golib/elastic" "github.com/forbearing/golib/jwt" "github.com/forbearing/golib/logger/logrus" @@ -67,3 +68,11 @@ func Bootstrap() error { initialized = true return Init() } + +func Run() error { + RegisterGo( + statsviz.Run, + router.Run, + ) + return Go() +} From 234f6b386d90b7f8b61cb1610411f39b6babd07a Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Mon, 3 Mar 2025 17:21:34 +0800 Subject: [PATCH 06/20] feat: support debug/statsviz --- config/config.go | 7 +++++++ config/consts.go | 4 ++++ debug/statsviz/statsviz.go | 23 +++++++++++++++++++++++ examples/myproject/main.go | 6 ++++-- go.mod | 1 + go.sum | 2 ++ 6 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 debug/statsviz/statsviz.go diff --git a/config/config.go b/config/config.go index c6ebffb..1c22321 100644 --- a/config/config.go +++ b/config/config.go @@ -219,6 +219,9 @@ func SetDefaultValue() { viper.SetDefault("server.db", DBSqlite) viper.SetDefault("server.domain", "") viper.SetDefault("server.enable_rbac", false) + viper.SetDefault("server.enable_statsviz", false) + viper.SetDefault("server.statsviz_listen", "") + viper.SetDefault("server.statsviz_port", 12345) viper.SetDefault("auth.none_expire_token", noneExpireToken) viper.SetDefault("auth.none_expire_username", noneExpireUser) @@ -438,6 +441,10 @@ type ServerConfig struct { DB DB `json:"db" mapstructure:"db" ini:"db" yaml:"db"` Domain string `json:"domain" mapstructure:"domain" ini:"domain" yaml:"domain"` EnableRBAC bool `json:"enable_rbac" mapstructure:"enable_rbac" ini:"enable_rbac" yaml:"enable_rbac"` + + EnableStatsviz bool `json:"enable_statsviz" mapstructure:"enable_statsviz" ini:"enable_statsviz" yaml:"enable_statsviz"` + StatsvizList string `json:"statsviz_list" mapstructure:"statsviz_list" ini:"statsviz_list" yaml:"statsviz_list"` + StatsvizPort int `json:"statsviz_port" mapstructure:"statsviz_port" ini:"statsviz_port" yaml:"statsviz_port"` } type AuthConfig struct { diff --git a/config/consts.go b/config/consts.go index 33a3f0e..8557ad4 100644 --- a/config/consts.go +++ b/config/consts.go @@ -8,6 +8,10 @@ const ( SERVER_DB = "SERVER_DB" SERVER_SLOW_QUERY_THRESHOLD = "SERVER_SLOW_QUERY_THRESHOLD" SERVER_ENABLE_RBAC = "SERVER_ENABLE_RBAC" + + SERVER_ENABLE_STATSVIZ = "SERVER_ENABLE_STATSVIZ" + SERVER_STATSVIZ_LISTEN = "SERVER_STATSVIZ_LISTEN" + SERVER_STATSVIZ_PORT = "SERVER_STATSVIZ_PORT" ) const ( diff --git a/debug/statsviz/statsviz.go b/debug/statsviz/statsviz.go new file mode 100644 index 0000000..7658012 --- /dev/null +++ b/debug/statsviz/statsviz.go @@ -0,0 +1,23 @@ +package statsviz + +import ( + "context" + "fmt" + "net/http" + + "github.com/arl/statsviz" + "github.com/forbearing/golib/config" + "go.uber.org/zap" +) + +func Run() error { + if config.App.EnableStatsviz { + mux := http.NewServeMux() + statsviz.Register(mux) + zap.S().Infow("successfully start statsviz", "listen", config.App.ServerConfig.StatsvizList, "port", config.App.ServerConfig.StatsvizPort) + return http.ListenAndServe(fmt.Sprintf("%s:%d", config.App.ServerConfig.StatsvizList, config.App.ServerConfig.StatsvizPort), mux) + } + + <-context.Background().Done() + return nil +} diff --git a/examples/myproject/main.go b/examples/myproject/main.go index a0e91bd..e2bfef5 100644 --- a/examples/myproject/main.go +++ b/examples/myproject/main.go @@ -3,6 +3,7 @@ package main import ( "fmt" "net/http" + "os" "time" "github.com/forbearing/golib/bootstrap" @@ -23,6 +24,8 @@ import ( ) func main() { + os.Setenv(config.SERVER_ENABLE_STATSVIZ, "true") + config.SetConfigFile("./config.ini") config.SetConfigName("config") config.SetConfigType("ini") @@ -111,8 +114,7 @@ func main() { router.RegisterWithConfig(&types.ControllerConfig[*pkgmodel.User]{DB: db}, router.API, "/external/user") router.RegisterWithConfig(&types.ControllerConfig[*model.Group]{DB: db}, router.API, "/external/group") - // Run server. - RunOrDie(router.Run) + RunOrDie(bootstrap.Run) } type WechatConfig struct { diff --git a/go.mod b/go.mod index c63245d..51365d1 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ toolchain go1.24.0 require ( github.com/allegro/bigcache v1.2.1 github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de + github.com/arl/statsviz v0.6.0 github.com/casbin/casbin/v2 v2.103.0 github.com/casbin/gorm-adapter/v3 v3.32.0 github.com/cloverstd/tcping v0.1.1 diff --git a/go.sum b/go.sum index 486effc..d57411c 100644 --- a/go.sum +++ b/go.sum @@ -32,6 +32,8 @@ github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1 github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhPwqqXc4/vE0f7GvRjuAsbW+HOIe8KnA= github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw= +github.com/arl/statsviz v0.6.0 h1:jbW1QJkEYQkufd//4NDYRSNBpwJNrdzPahF7ZmoGdyE= +github.com/arl/statsviz v0.6.0/go.mod h1:0toboo+YGSUXDaS4g1D5TVS4dXs7S7YYT5J/qnW2h8s= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= From 6af0cd25673cf5e0f32af907bd14e5d4ca64a29f Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Mon, 3 Mar 2025 17:27:18 +0800 Subject: [PATCH 07/20] fix(config): correct statsviz listen address field name --- config/config.go | 2 +- debug/statsviz/statsviz.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index 1c22321..5884299 100644 --- a/config/config.go +++ b/config/config.go @@ -443,7 +443,7 @@ type ServerConfig struct { EnableRBAC bool `json:"enable_rbac" mapstructure:"enable_rbac" ini:"enable_rbac" yaml:"enable_rbac"` EnableStatsviz bool `json:"enable_statsviz" mapstructure:"enable_statsviz" ini:"enable_statsviz" yaml:"enable_statsviz"` - StatsvizList string `json:"statsviz_list" mapstructure:"statsviz_list" ini:"statsviz_list" yaml:"statsviz_list"` + StatsvizListen string `json:"statsviz_listen" mapstructure:"statsviz_listen" ini:"statsviz_listen" yaml:"statsviz_listen"` StatsvizPort int `json:"statsviz_port" mapstructure:"statsviz_port" ini:"statsviz_port" yaml:"statsviz_port"` } diff --git a/debug/statsviz/statsviz.go b/debug/statsviz/statsviz.go index 7658012..00907b5 100644 --- a/debug/statsviz/statsviz.go +++ b/debug/statsviz/statsviz.go @@ -14,8 +14,8 @@ func Run() error { if config.App.EnableStatsviz { mux := http.NewServeMux() statsviz.Register(mux) - zap.S().Infow("successfully start statsviz", "listen", config.App.ServerConfig.StatsvizList, "port", config.App.ServerConfig.StatsvizPort) - return http.ListenAndServe(fmt.Sprintf("%s:%d", config.App.ServerConfig.StatsvizList, config.App.ServerConfig.StatsvizPort), mux) + zap.S().Infow("successfully start statsviz", "listen", config.App.ServerConfig.StatsvizListen, "port", config.App.ServerConfig.StatsvizPort) + return http.ListenAndServe(fmt.Sprintf("%s:%d", config.App.ServerConfig.StatsvizListen, config.App.ServerConfig.StatsvizPort), mux) } <-context.Background().Done() From 90c1ad4a741a979923af44b5c3a29049cd7d1e98 Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Tue, 4 Mar 2025 00:48:24 +0800 Subject: [PATCH 08/20] fix(config): support parse default for time.Duration --- config/config.go | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/config/config.go b/config/config.go index 5884299..080a618 100644 --- a/config/config.go +++ b/config/config.go @@ -158,6 +158,9 @@ func registerType(name string, typ reflect.Type) { if err := defaults.Set(cfg); err != nil { zap.S().Warnw("failed to set default value", "name", name, "type", typ, "error", err) } + // NOTE: package "defaults" not support set default value for time.Duration, so we should set it manually. + setDefaultDurationFields(typ, reflect.ValueOf(cfg).Elem()) + // Set config value from config file. if err := viper.UnmarshalKey(name, cfg); err != nil { zap.S().Warnw("failed to unmarshal config", "name", name, "type", typ, "error", err) @@ -165,6 +168,52 @@ func registerType(name string, typ reflect.Type) { registeredConfigs[name] = cfg } +func setDefaultDurationFields(typ reflect.Type, val reflect.Value) { + if typ.Kind() != reflect.Struct { + return + } + for i := range typ.NumField() { + fieldTyp := typ.Field(i) + fieldVal := val.Field(i) + + // Handle embedded structs + if fieldTyp.Anonymous && fieldTyp.Type.Kind() == reflect.Struct { + setDefaultDurationFields(fieldTyp.Type, fieldVal) + continue + } + + // Handle time.Duration field + if fieldTyp.Type == reflect.TypeOf(time.Duration(0)) { + // Check if the field has a default tag and its current value is zero + if defaultValue, ok := fieldTyp.Tag.Lookup("default"); ok && fieldVal.Interface().(time.Duration) == 0 { + // Parse the duration string + if duration, err := time.ParseDuration(defaultValue); err == nil { + fieldVal.Set(reflect.ValueOf(duration)) + } else { + zap.S().Warnw("failed to parse duration default value", + "field", fieldTyp.Name, + "default", defaultValue, + "error", err) + } + } + } + + // Recursively process nested structs (if not embedded) + if fieldTyp.Type.Kind() == reflect.Struct && !fieldTyp.Anonymous { + setDefaultDurationFields(fieldTyp.Type, fieldVal) + } + + // Handle pointer to struct + if fieldTyp.Type.Kind() == reflect.Ptr && fieldTyp.Type.Elem().Kind() == reflect.Struct { + // If the pointer is nil, initialize it + if fieldVal.IsNil() { + fieldVal.Set(reflect.New(fieldTyp.Type.Elem())) + } + setDefaultDurationFields(fieldTyp.Type.Elem(), fieldVal.Elem()) + } + } +} + // Get returns the registered configuration by name. // The type parameter T must match the registered type or be a pointer to it, // othherwise a zero value or nil pointer will be returned. From 535eb2e5a25a2faad3df14b070d92142e24b8ae2 Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Tue, 4 Mar 2025 16:01:14 +0800 Subject: [PATCH 09/20] chg(controller): createSession -> CreateSession --- controller/helper.go | 2 +- controller/user.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/helper.go b/controller/helper.go index 9cd44f7..9760091 100644 --- a/controller/helper.go +++ b/controller/helper.go @@ -7,7 +7,7 @@ import ( "github.com/mssola/useragent" ) -func createSession(c *gin.Context) *model.Session { +func CreateSession(c *gin.Context) *model.Session { ua := useragent.New(c.Request.UserAgent()) engineName, engineVersion := ua.Engine() browserName, browserVersion := ua.Browser() diff --git a/controller/user.go b/controller/user.go index b5d335c..2c87156 100644 --- a/controller/user.go +++ b/controller/user.go @@ -76,7 +76,7 @@ func (*user) Login(c *gin.Context) { return } // TODO: 把以前的 token 失效掉 - aToken, rToken, err := jwt.GenTokens(u.ID, req.Name, createSession(c)) + aToken, rToken, err := jwt.GenTokens(u.ID, req.Name, CreateSession(c)) if err != nil { ResponseJSON(c, CodeFailure) return From 03d981bce1c5622bb4d9d32b224691a6bbdb3f72 Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Tue, 4 Mar 2025 21:13:23 +0800 Subject: [PATCH 10/20] enh(config): support read custom config values from envrionment variables, the priority is: env var > config file > default values --- config/config.go | 100 +++++++++++++++++++++++++++++++++++-- config/config_test.go | 38 ++++++++++++-- examples/myproject/main.go | 3 ++ 3 files changed, 134 insertions(+), 7 deletions(-) diff --git a/config/config.go b/config/config.go index 080a618..9b9d7c6 100644 --- a/config/config.go +++ b/config/config.go @@ -6,6 +6,7 @@ import ( "path/filepath" "reflect" "runtime" + "strconv" "strings" "sync" "time" @@ -112,9 +113,16 @@ func Init() (err error) { // The registered type will be used to create and initialize the configuration // instance when loading configuration from file or environment variables. // -// The struct tag "default" can be used to set default value for the configuration. -// Register can be called before or after `Init`. -// NOTE: registered config not support set default value from environment variables. +// Configuration values are loaded in the following priority order (from highest to lowest): +// 1. Environment variables (format: SECTION_FIELD, e.g., NATS_USERNAME) +// 2. Configuration file values +// 3. Default values from struct tags +// +// The struct tag "default" can be used to set default values for fields. +// For time.Duration fields, you can use duration strings like "5s", "1m", etc. +// +// Register can be called before or after `Init`. If called before `Init`, +// the registration will be processed during initialization. // // Example usage: // @@ -131,11 +139,18 @@ func Init() (err error) { // Timeout time.Duration `json:"timeout" mapstructure:"timeout" default:"5s"` // Enable bool `json:"enable" mapstructure:"enable"` // } +// // // Register with struct type // config.Register[WechatConfig]("wechat") // // // Register with pointer type (equivalent to above) -// config.Register[*WechatConfig]("wechat") +// config.Register[*NatsConfig]("nats") +// +// After registration, you can access the config using Get: +// +// natsCfg := config.Get[NatsConfig]("nats") +// // or with pointer +// natsPtr := config.Get[*NatsConfig]("nats") func Register[T any](name string) { mu.Lock() defer mu.Unlock() @@ -165,6 +180,54 @@ func registerType(name string, typ reflect.Type) { if err := viper.UnmarshalKey(name, cfg); err != nil { zap.S().Warnw("failed to unmarshal config", "name", name, "type", typ, "error", err) } + + // Set config value from environment variables. + envCfg := reflect.New(typ).Interface() + envPrefix := strings.ToUpper(name) + "_" + v := reflect.ValueOf(envCfg).Elem() + t := v.Type() + for i := 0; i < t.NumField(); i++ { + field := t.Field(i) + mapstructureTag := field.Tag.Get("mapstructure") + if len(mapstructureTag) == 0 { + continue + } + envKey := envPrefix + strings.ToUpper(mapstructureTag) + if envVal, exists := os.LookupEnv(envKey); exists { + fieldVal := v.Field(i) + switch fieldVal.Kind() { + case reflect.String: + fieldVal.SetString(envVal) + case reflect.Bool: + boolVal, err := strconv.ParseBool(envVal) + if err == nil { + fieldVal.SetBool(boolVal) + } + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + if field.Type == reflect.TypeOf(time.Duration(0)) { + // handle time.Duration + if duration, err := time.ParseDuration(envVal); err == nil { + fieldVal.SetInt(int64(duration)) + } + } else { + if intVal, err := strconv.ParseInt(envVal, 10, 64); err == nil { + fieldVal.SetInt(intVal) + } + } + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + if uintVal, err := strconv.ParseUint(envVal, 10, 64); err == nil { + fieldVal.SetUint(uintVal) + } + case reflect.Float32, reflect.Float64: + if floatVal, err := strconv.ParseFloat(envVal, 64); err == nil { + fieldVal.SetFloat(floatVal) + } + + } + } + } + mergeNonZeroFields(reflect.ValueOf(cfg).Elem(), v) + registeredConfigs[name] = cfg } @@ -214,6 +277,35 @@ func setDefaultDurationFields(typ reflect.Type, val reflect.Value) { } } +func mergeNonZeroFields(dst, src reflect.Value) { + for i := 0; i < src.NumField(); i++ { + srcField := src.Field(i) + if !isZeroValue(srcField) { + dst.Field(i).Set(srcField) + } + } +} + +func isZeroValue(v reflect.Value) bool { + switch v.Kind() { + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.String: + return v.String() == "" + case reflect.Slice, reflect.Map: + return v.Len() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + } + return false +} + // Get returns the registered configuration by name. // The type parameter T must match the registered type or be a pointer to it, // othherwise a zero value or nil pointer will be returned. diff --git a/config/config_test.go b/config/config_test.go index 84351b2..f796f91 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -7,7 +7,7 @@ import ( "github.com/forbearing/golib/bootstrap" "github.com/forbearing/golib/config" - "github.com/forbearing/golib/util" + . "github.com/forbearing/golib/util" "github.com/stretchr/testify/assert" ) @@ -33,7 +33,7 @@ func TestRegisterStruct(t *testing.T) { config.Register[WechatConfig]("wechat") config.SetConfigFile(filename) - util.RunOrDie(bootstrap.Bootstrap) + RunOrDie(bootstrap.Bootstrap) // Register config after bootstrap config.Register[NatsConfig]("nats") @@ -61,7 +61,7 @@ func TestRegisterStructPointer(t *testing.T) { config.Register[*WechatConfig]("wechat") config.SetConfigFile(filename) - util.RunOrDie(bootstrap.Bootstrap) + RunOrDie(bootstrap.Bootstrap) // Register config after bootstrap config.Register[*NatsConfig]("nats") @@ -80,6 +80,38 @@ func TestRegisterStructPointer(t *testing.T) { assert.Equal(t, true, nats.Enable) } +func TestRegisterStructFromEnv(t *testing.T) { + if err := os.WriteFile(filename, []byte(configData), 0o644); err != nil { + t.Fatal(err) + } + + os.Setenv("NATS_USERNAME", "user_from_env") + os.Setenv("NATS_PASSWORD", "pass_from_env") + os.Setenv("NATS_TIMEOUT", "60s") + + // Register config before bootstrap + config.Register[WechatConfig]("wechat") + + config.SetConfigFile(filename) + RunOrDie(bootstrap.Bootstrap) + + // Register config after bootstrap + config.Register[NatsConfig]("nats") + + wechat := config.Get[*WechatConfig]("wechat") + + assert.Equal(t, "wx123456789", wechat.AppID) + assert.Equal(t, "myappsecret", wechat.AppSecret) + assert.Equal(t, false, wechat.Enable) + + nats := config.Get[NatsConfig]("nats") + assert.Equal(t, "nats://127.0.0.1:4222", nats.URL) + assert.Equal(t, "user_from_env", nats.Username) + assert.Equal(t, "pass_from_env", nats.Password) + assert.Equal(t, 60*time.Second, nats.Timeout) + assert.Equal(t, true, nats.Enable) +} + type WechatConfig struct { AppID string `json:"app_id" mapstructure:"app_id" default:"myappid"` AppSecret string `json:"app_secret" mapstructure:"app_secret" default:"myappsecret"` diff --git a/examples/myproject/main.go b/examples/myproject/main.go index e2bfef5..697f221 100644 --- a/examples/myproject/main.go +++ b/examples/myproject/main.go @@ -25,6 +25,9 @@ import ( func main() { os.Setenv(config.SERVER_ENABLE_STATSVIZ, "true") + os.Setenv("NATS_USERNAME", "user_from_env") + os.Setenv("NATS_PASSWORD", "pass_from_env") + os.Setenv("NATS_TIMEOUT", "60s") config.SetConfigFile("./config.ini") config.SetConfigName("config") From 0a754a1da3a2228313e8af4d9172e243227df6d2 Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Wed, 5 Mar 2025 01:19:20 +0800 Subject: [PATCH 11/20] feat: support debug tools: "pprof","gops" --- bootstrap/bootstrap.go | 6 +++++- config/config.go | 34 ++++++++++++++++++++++++++-------- config/consts.go | 18 ++++++++++++++---- debug/gops/gops.go | 25 +++++++++++++++++++++++++ debug/pprof/pprof.go | 24 ++++++++++++++++++++++++ debug/statsviz/statsviz.go | 4 ++-- examples/myproject/main.go | 4 +++- go.mod | 1 + go.sum | 2 ++ 9 files changed, 102 insertions(+), 16 deletions(-) create mode 100644 debug/gops/gops.go create mode 100644 debug/pprof/pprof.go diff --git a/bootstrap/bootstrap.go b/bootstrap/bootstrap.go index 035717e..b09e204 100644 --- a/bootstrap/bootstrap.go +++ b/bootstrap/bootstrap.go @@ -12,6 +12,8 @@ import ( "github.com/forbearing/golib/database/redis" "github.com/forbearing/golib/database/sqlite" "github.com/forbearing/golib/database/sqlserver" + "github.com/forbearing/golib/debug/gops" + "github.com/forbearing/golib/debug/pprof" "github.com/forbearing/golib/debug/statsviz" "github.com/forbearing/golib/elastic" "github.com/forbearing/golib/jwt" @@ -71,8 +73,10 @@ func Bootstrap() error { func Run() error { RegisterGo( - statsviz.Run, router.Run, + statsviz.Run, + pprof.Run, + gops.Run, ) return Go() } diff --git a/config/config.go b/config/config.go index 9b9d7c6..6e37e61 100644 --- a/config/config.go +++ b/config/config.go @@ -360,9 +360,6 @@ func SetDefaultValue() { viper.SetDefault("server.db", DBSqlite) viper.SetDefault("server.domain", "") viper.SetDefault("server.enable_rbac", false) - viper.SetDefault("server.enable_statsviz", false) - viper.SetDefault("server.statsviz_listen", "") - viper.SetDefault("server.statsviz_port", 12345) viper.SetDefault("auth.none_expire_token", noneExpireToken) viper.SetDefault("auth.none_expire_username", noneExpireUser) @@ -514,6 +511,16 @@ func SetDefaultValue() { viper.SetDefault("feishu.msg_app_id", "") viper.SetDefault("feishu.msg_app_secret", "") viper.SetDefault("feishu.enable", false) + + viper.SetDefault("debug.enable_statsviz", false) + viper.SetDefault("debug.enable_pprof", false) + viper.SetDefault("debug.enable_gops", false) + viper.SetDefault("debug.statsviz_listen", "127.0.0.1") + viper.SetDefault("debug.pprof_listen", "127.0.0.1") + viper.SetDefault("debug.gops_listen", "127.0.0.1") + viper.SetDefault("debug.statsviz_port", 10000) + viper.SetDefault("debug.pprof_port", 10001) + viper.SetDefault("debug.gops_port", 10002) } // SetConfigFile set the config file path. @@ -571,8 +578,9 @@ type Config struct { LoggerConfig `json:"logger" mapstructure:"logger" ini:"logger" yaml:"logger"` LdapConfig `json:"ldap" mapstructure:"ldap" ini:"ldap" yaml:"ldap"` InfluxdbConfig `json:"influxdb" mapstructure:"influxdb" ini:"influxdb" yaml:"influxdb"` - FeishuConfig `json:"feishu" mapstructure:"feishu" ini:"feishu" yaml:"feishu"` MqttConfig `json:"mqtt" mapstructure:"mqtt" ini:"mqtt" yaml:"mqtt"` + FeishuConfig `json:"feishu" mapstructure:"feishu" ini:"feishu" yaml:"feishu"` + DebugConfig `json:"debug" mapstructure:"debug" ini:"debug" yaml:"debug"` } type ServerConfig struct { @@ -582,10 +590,6 @@ type ServerConfig struct { DB DB `json:"db" mapstructure:"db" ini:"db" yaml:"db"` Domain string `json:"domain" mapstructure:"domain" ini:"domain" yaml:"domain"` EnableRBAC bool `json:"enable_rbac" mapstructure:"enable_rbac" ini:"enable_rbac" yaml:"enable_rbac"` - - EnableStatsviz bool `json:"enable_statsviz" mapstructure:"enable_statsviz" ini:"enable_statsviz" yaml:"enable_statsviz"` - StatsvizListen string `json:"statsviz_listen" mapstructure:"statsviz_listen" ini:"statsviz_listen" yaml:"statsviz_listen"` - StatsvizPort int `json:"statsviz_port" mapstructure:"statsviz_port" ini:"statsviz_port" yaml:"statsviz_port"` } type AuthConfig struct { @@ -823,3 +827,17 @@ type FeishuConfig struct { MsgAppSecret string `json:"msg_app_secret" mapstructure:"msg_app_secret" ini:"msg_app_secret" yaml:"msg_app_secret"` Enable bool `json:"enable" mapstructure:"enable" ini:"enable" yaml:"enable"` } + +type DebugConfig struct { + EnableStatsviz bool `json:"enable_statsviz" mapstructure:"enable_statsviz" ini:"enable_statsviz" yaml:"enable_statsviz"` + StatsvizListen string `json:"statsviz_listen" mapstructure:"statsviz_listen" ini:"statsviz_listen" yaml:"statsviz_listen"` + StatsvizPort int `json:"statsviz_port" mapstructure:"statsviz_port" ini:"statsviz_port" yaml:"statsviz_port"` + + EnablePprof bool `json:"enable_pprof" mapstructure:"enable_pprof" ini:"enable_pprof" yaml:"enable_pprof"` + PprofListen string `json:"pprof_listen" mapstructure:"pprof_listen" ini:"pprof_listen" yaml:"pprof_listen"` + PprofPort int `json:"pprof_port" mapstructure:"pprof_port" ini:"pprof_port" yaml:"pprof_port"` + + EnableGops bool `json:"enable_gops" mapstructure:"enable_gops" ini:"enable_gops" yaml:"enable_gops"` + GopsListen string `json:"gops_listen" mapstructure:"gops_listen" ini:"gops_listen" yaml:"gops_listen"` + GopsPort int `json:"gops_port" mapstructure:"gops_port" ini:"gops_port" yaml:"gops_port"` +} diff --git a/config/consts.go b/config/consts.go index 8557ad4..01758a1 100644 --- a/config/consts.go +++ b/config/consts.go @@ -8,10 +8,6 @@ const ( SERVER_DB = "SERVER_DB" SERVER_SLOW_QUERY_THRESHOLD = "SERVER_SLOW_QUERY_THRESHOLD" SERVER_ENABLE_RBAC = "SERVER_ENABLE_RBAC" - - SERVER_ENABLE_STATSVIZ = "SERVER_ENABLE_STATSVIZ" - SERVER_STATSVIZ_LISTEN = "SERVER_STATSVIZ_LISTEN" - SERVER_STATSVIZ_PORT = "SERVER_STATSVIZ_PORT" ) const ( @@ -198,3 +194,17 @@ const ( FEISHU_MSG_APP_SECRET = "FEISHU_MSG_APP_SECRET" FEISHU_ENABLE = "FEISHU_ENABLE" ) + +const ( + DEBUG_ENABLE_STATSVIZ = "DEBUG_ENABLE_STATSVIZ" + DEBUG_ENABLE_PPROF = "DEBUG_ENABLE_PPROF" + DEBUG_ENABLE_GOPS = "DEBUG_ENABLE_GOPS" + + DEBUG_STATSVIZ_LISTEN = "DEBUG_STATSVIZ_LISTEN" + DEBUG_PPROF_LISTEN = "DEBUG_PPROF_LISTEN" + DEBUG_GOPS_LISTEN = "DEBUG_GOPS_LISTEN" + + DEBUG_STATSVIZ_PORT = "DEBUG_STATSVIZ_PORT" + DEBUG_PPROF_PORT = "DEBUG_PPROF_PORT" + DEBUG_GOPS_PORT = "DEBUG_GOPS_PORT" +) diff --git a/debug/gops/gops.go b/debug/gops/gops.go new file mode 100644 index 0000000..ed5a831 --- /dev/null +++ b/debug/gops/gops.go @@ -0,0 +1,25 @@ +package gops + +import ( + "context" + "fmt" + + "github.com/forbearing/golib/config" + "github.com/google/gops/agent" + "go.uber.org/zap" +) + +func Run() error { + if config.App.EnableGops { + if err := agent.Listen(agent.Options{ + Addr: fmt.Sprintf("%s:%d", config.App.GopsListen, config.App.GopsPort), + ShutdownCleanup: true, + ConfigDir: "/tmp/gops", + }); err != nil { + return err + } + } + zap.S().Infow("successfully start gops", "listen", config.App.GopsListen, "port", config.App.GopsPort) + <-context.Background().Done() + return nil +} diff --git a/debug/pprof/pprof.go b/debug/pprof/pprof.go new file mode 100644 index 0000000..68588ac --- /dev/null +++ b/debug/pprof/pprof.go @@ -0,0 +1,24 @@ +package pprof + +import ( + "context" + "fmt" + "net/http" + _ "net/http/pprof" + + "github.com/forbearing/golib/config" + "go.uber.org/zap" +) + +func Run() error { + if config.App.EnablePprof { + server := &http.Server{ + Addr: fmt.Sprintf("%s:%d", config.App.PprofListen, config.App.PprofPort), + Handler: http.DefaultServeMux, + } + zap.S().Infow("successfully start pprof", "listen", config.App.PprofListen, "port", config.App.PprofPort) + return server.ListenAndServe() + } + <-context.Background().Done() + return nil +} diff --git a/debug/statsviz/statsviz.go b/debug/statsviz/statsviz.go index 00907b5..9965713 100644 --- a/debug/statsviz/statsviz.go +++ b/debug/statsviz/statsviz.go @@ -14,8 +14,8 @@ func Run() error { if config.App.EnableStatsviz { mux := http.NewServeMux() statsviz.Register(mux) - zap.S().Infow("successfully start statsviz", "listen", config.App.ServerConfig.StatsvizListen, "port", config.App.ServerConfig.StatsvizPort) - return http.ListenAndServe(fmt.Sprintf("%s:%d", config.App.ServerConfig.StatsvizListen, config.App.ServerConfig.StatsvizPort), mux) + zap.S().Infow("successfully start statsviz", "listen", config.App.StatsvizListen, "port", config.App.StatsvizPort) + return http.ListenAndServe(fmt.Sprintf("%s:%d", config.App.StatsvizListen, config.App.StatsvizPort), mux) } <-context.Background().Done() diff --git a/examples/myproject/main.go b/examples/myproject/main.go index 697f221..692c2b8 100644 --- a/examples/myproject/main.go +++ b/examples/myproject/main.go @@ -24,7 +24,9 @@ import ( ) func main() { - os.Setenv(config.SERVER_ENABLE_STATSVIZ, "true") + os.Setenv(config.DEBUG_ENABLE_STATSVIZ, "true") + os.Setenv(config.DEBUG_ENABLE_PPROF, "true") + os.Setenv(config.DEBUG_ENABLE_GOPS, "true") os.Setenv("NATS_USERNAME", "user_from_env") os.Setenv("NATS_PASSWORD", "pass_from_env") os.Setenv("NATS_TIMEOUT", "60s") diff --git a/go.mod b/go.mod index 51365d1..b22ca25 100644 --- a/go.mod +++ b/go.mod @@ -25,6 +25,7 @@ require ( github.com/go-redis/redis/v8 v8.11.5 github.com/golang-jwt/jwt/v5 v5.2.1 github.com/google/go-querystring v1.1.0 + github.com/google/gops v0.3.28 github.com/google/uuid v1.6.0 github.com/gorilla/schema v1.4.1 github.com/gorilla/websocket v1.5.3 diff --git a/go.sum b/go.sum index d57411c..506b637 100644 --- a/go.sum +++ b/go.sum @@ -162,6 +162,8 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gops v0.3.28 h1:2Xr57tqKAmQYRAfG12E+yLcoa2Y42UJo2lOrUFL9ark= +github.com/google/gops v0.3.28/go.mod h1:6f6+Nl8LcHrzJwi8+p0ii+vmBFSlB4f8cOOkTJ7sk4c= github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo= github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= From 0ce91dffda231f55c18e8d33c2bb92a5ff1c8aea Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Wed, 5 Mar 2025 16:53:55 +0800 Subject: [PATCH 12/20] chore(example): update example/myproject --- examples/myproject/.air.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/myproject/.air.conf b/examples/myproject/.air.conf index 817fd32..21cc632 100644 --- a/examples/myproject/.air.conf +++ b/examples/myproject/.air.conf @@ -29,6 +29,10 @@ stop_on_error = true # air的日志文件名,该日志文件放置在你的`tmp_dir`中 log = "air_errors.log" +kill_delay = "5s" +send_interrupt = true + + [log] # 显示日志时间 time = true From a6a55733761e00765ab88cbc71ff30045fd5d87c Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Wed, 5 Mar 2025 16:55:32 +0800 Subject: [PATCH 13/20] chore(router): refine final shutdown log message --- router/router.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/router/router.go b/router/router.go index 81394b0..9a61257 100644 --- a/router/router.go +++ b/router/router.go @@ -75,14 +75,14 @@ func Run() error { }() sig := <-quit - log.Infow("shutting down server...", "signal", sig.String()) + log.Infow("shutting down server", "signal", sig.String()) ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() if err := server.Shutdown(ctx); err != nil { - log.Errorw("failed to shutdown server", "err", err, "signal", sig.String()) + log.Errorw("failed to shutdown server", "err", err, "signal", sig) return err } - log.Infow("server exiting", "signal", sig.String()) + log.Infow("successfully shutdown server", "signal", sig) return nil } From 0e515711e8798716cc7a6b3acfa6c3a0cf1f195e Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Wed, 5 Mar 2025 17:52:35 +0800 Subject: [PATCH 14/20] style(router): standardize server log message format --- router/router.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/router/router.go b/router/router.go index 9a61257..29dde25 100644 --- a/router/router.go +++ b/router/router.go @@ -53,7 +53,7 @@ func Init() error { func Run() error { log := zap.S() addr := net.JoinHostPort(config.App.ServerConfig.Listen, strconv.Itoa(config.App.ServerConfig.Port)) - log.Infow("starting server", "addr", addr, "mode", config.App.Mode, "domain", config.App.Domain) + log.Infow("backend server started", "addr", addr, "mode", config.App.Mode, "domain", config.App.Domain) for _, r := range Base.Routes() { log.Debugw("", "method", r.Method, "path", r.Path) } @@ -75,14 +75,14 @@ func Run() error { }() sig := <-quit - log.Infow("shutting down server", "signal", sig.String()) + log.Infow("backend server shutdown initiated", "signal", sig) ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() if err := server.Shutdown(ctx); err != nil { - log.Errorw("failed to shutdown server", "err", err, "signal", sig) + log.Errorw("backend server shutdown failed", "err", err, "signal", sig) return err } - log.Infow("successfully shutdown server", "signal", sig) + log.Infow("backend server shutdown completed", "signal", sig) return nil } From c104c44b7b81a93ee116b54c8c8427789a438912 Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Wed, 5 Mar 2025 17:52:57 +0800 Subject: [PATCH 15/20] fix(debug): improve statsviz shutdown handing --- debug/statsviz/statsviz.go | 39 ++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/debug/statsviz/statsviz.go b/debug/statsviz/statsviz.go index 9965713..005d035 100644 --- a/debug/statsviz/statsviz.go +++ b/debug/statsviz/statsviz.go @@ -4,6 +4,10 @@ import ( "context" "fmt" "net/http" + "os" + "os/signal" + "syscall" + "time" "github.com/arl/statsviz" "github.com/forbearing/golib/config" @@ -11,13 +15,36 @@ import ( ) func Run() error { - if config.App.EnableStatsviz { - mux := http.NewServeMux() - statsviz.Register(mux) - zap.S().Infow("successfully start statsviz", "listen", config.App.StatsvizListen, "port", config.App.StatsvizPort) - return http.ListenAndServe(fmt.Sprintf("%s:%d", config.App.StatsvizListen, config.App.StatsvizPort), mux) + if !config.App.EnableStatsviz { + return nil } - <-context.Background().Done() + log := zap.S() + mux := http.NewServeMux() + statsviz.Register(mux) + + server := &http.Server{ + Addr: fmt.Sprintf("%s:%d", config.App.StatsvizListen, config.App.StatsvizPort), + Handler: mux, + } + + quit := make(chan os.Signal, 1) + signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT) + go func() { + log.Infow("statsviz server started", "listen", config.App.StatsvizListen, "port", config.App.StatsvizPort) + if err := server.ListenAndServe(); err != nil && err != http.ErrServerClosed { + log.Errorw("failed to start statsviz", "err", err) + } + }() + + sig := <-quit + log.Infow("statsviz shutdown initiated", "signal", sig) + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + if err := server.Shutdown(ctx); err != nil { + log.Errorw("statsviz shutdown failed", "err", err, "signal", sig) + return err + } + log.Infow("statsviz shutdown completed", "signal", sig) return nil } From 261fa22defb142344f146e3b656115eda2ef6cdc Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Wed, 5 Mar 2025 17:53:19 +0800 Subject: [PATCH 16/20] fix(debug): improve gops shutdown handing --- debug/gops/gops.go | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/debug/gops/gops.go b/debug/gops/gops.go index ed5a831..c016f66 100644 --- a/debug/gops/gops.go +++ b/debug/gops/gops.go @@ -1,8 +1,10 @@ package gops import ( - "context" "fmt" + "os" + "os/signal" + "syscall" "github.com/forbearing/golib/config" "github.com/google/gops/agent" @@ -10,16 +12,29 @@ import ( ) func Run() error { - if config.App.EnableGops { - if err := agent.Listen(agent.Options{ - Addr: fmt.Sprintf("%s:%d", config.App.GopsListen, config.App.GopsPort), - ShutdownCleanup: true, - ConfigDir: "/tmp/gops", - }); err != nil { - return err - } + if !config.App.EnableGops { + return nil } - zap.S().Infow("successfully start gops", "listen", config.App.GopsListen, "port", config.App.GopsPort) - <-context.Background().Done() + log := zap.S() + err := agent.Listen(agent.Options{ + Addr: fmt.Sprintf("%s:%d", config.App.GopsListen, config.App.GopsPort), + ShutdownCleanup: true, + ConfigDir: "/tmp/gops", + }) + if err != nil { + log.Errorw("gops agent startup failed", "err", err) + return err + } + + log.Infow("gops agent started", "listen", config.App.GopsListen, "port", config.App.GopsPort) + + quit := make(chan os.Signal, 1) + signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT) + + sig := <-quit + log.Infow("gops agent shutdown initiated", "signal", sig) + agent.Close() + log.Infow("gops agent shutdown completed", "signal", sig) + return nil } From 83b3b923ae6003760902bcf426ff4b1c7a57647e Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Wed, 5 Mar 2025 17:53:30 +0800 Subject: [PATCH 17/20] fix(debug): improve pprof shutdown handing --- debug/pprof/pprof.go | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/debug/pprof/pprof.go b/debug/pprof/pprof.go index 68588ac..21a98f2 100644 --- a/debug/pprof/pprof.go +++ b/debug/pprof/pprof.go @@ -5,20 +5,43 @@ import ( "fmt" "net/http" _ "net/http/pprof" + "os" + "os/signal" + "syscall" + "time" "github.com/forbearing/golib/config" "go.uber.org/zap" ) func Run() error { - if config.App.EnablePprof { - server := &http.Server{ - Addr: fmt.Sprintf("%s:%d", config.App.PprofListen, config.App.PprofPort), - Handler: http.DefaultServeMux, + if !config.App.EnablePprof { + return nil + } + + log := zap.S() + server := &http.Server{ + Addr: fmt.Sprintf("%s:%d", config.App.PprofListen, config.App.PprofPort), + Handler: http.DefaultServeMux, + } + + quit := make(chan os.Signal, 1) + signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT) + go func() { + log.Infow("pprof server started", "listen", config.App.PprofListen, "port", config.App.PprofPort) + if err := server.ListenAndServe(); err != nil && err != http.ErrServerClosed { + log.Errorw("failed to start pprof", "err", err) } - zap.S().Infow("successfully start pprof", "listen", config.App.PprofListen, "port", config.App.PprofPort) - return server.ListenAndServe() + }() + + sig := <-quit + log.Infow("pprof shutdown initiated", "signal", sig) + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + if err := server.Shutdown(ctx); err != nil { + log.Errorw("pprof shutdown failed", "err", err, "signal", sig) + return err } - <-context.Background().Done() + log.Infow("pprof shutdown completed", "signal", sig) return nil } From 5bbff005dd934aaab487a811af0d2790c8651f49 Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Wed, 5 Mar 2025 17:54:42 +0800 Subject: [PATCH 18/20] refactor(boostrap): replace channel with errgroup for concurrent initialization --- bootstrap/initializer.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bootstrap/initializer.go b/bootstrap/initializer.go index 8066f32..4682616 100644 --- a/bootstrap/initializer.go +++ b/bootstrap/initializer.go @@ -1,6 +1,10 @@ package bootstrap -import "fmt" +import ( + "context" + + "golang.org/x/sync/errgroup" +) var _initializer = new(initializer) @@ -32,19 +36,15 @@ func (i *initializer) Init() error { } func (i *initializer) Go() error { - errCh := make(chan error, 1) - for j := range i.gos { - fn := i.gos[j] + g, _ := errgroup.WithContext(context.Background()) + for _, fn := range i.gos { if fn == nil { - fmt.Println("is nil") continue } - go func(fn initFunc) { - errCh <- fn() - }(fn) + g.Go(fn) } - return <-errCh + return g.Wait() } func Register(fn ...initFunc) { _initializer.Register(fn...) } From 4be8d0d6015d0e2c5a39d55ce9d8045c937ef7b4 Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Wed, 5 Mar 2025 21:11:38 +0800 Subject: [PATCH 19/20] chore(example): update examples/myproject --- examples/myproject/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/myproject/main.go b/examples/myproject/main.go index 692c2b8..f49bb72 100644 --- a/examples/myproject/main.go +++ b/examples/myproject/main.go @@ -1,7 +1,6 @@ package main import ( - "fmt" "net/http" "os" "time" @@ -19,6 +18,7 @@ import ( "github.com/forbearing/golib/types" . "github.com/forbearing/golib/util" "github.com/gin-gonic/gin" + "go.uber.org/zap" _ "github.com/forbearing/golib/examples/myproject/service" ) @@ -52,8 +52,8 @@ func main() { // Register config after bootstrap. config.Register[*NatsConfig]("nats") - fmt.Printf("%+v\n", config.Get[*WechatConfig]("wechat")) - fmt.Printf("%+v\n", config.Get[NatsConfig]("nats")) + zap.S().Infof("%+v", config.Get[*WechatConfig]("wechat")) + zap.S().Infof("%+v", config.Get[*NatsConfig]("nats")) // Register task and cronjob after bootstrap. task.Register(SayGoodbye, 1*time.Second, "say goodbye") From d5cd681572d0e152dc7f245a9a519fab9bbc6e41 Mon Sep 17 00:00:00 2001 From: hybfkuf Date: Wed, 5 Mar 2025 21:13:04 +0800 Subject: [PATCH 20/20] feat(bootstrap): optimize cpu utilization with automaxprocs --- bootstrap/bootstrap.go | 3 +++ go.mod | 3 ++- go.sum | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bootstrap/bootstrap.go b/bootstrap/bootstrap.go index b09e204..04c1ab3 100644 --- a/bootstrap/bootstrap.go +++ b/bootstrap/bootstrap.go @@ -28,6 +28,7 @@ import ( "github.com/forbearing/golib/router" "github.com/forbearing/golib/service" "github.com/forbearing/golib/task" + "go.uber.org/automaxprocs/maxprocs" ) var ( @@ -36,6 +37,8 @@ var ( ) func Bootstrap() error { + maxprocs.Set(maxprocs.Logger(zap.New().Infof)) + mu.Lock() defer mu.Unlock() if initialized { diff --git a/go.mod b/go.mod index b22ca25..559b651 100644 --- a/go.mod +++ b/go.mod @@ -49,11 +49,13 @@ require ( github.com/sunshineplan/imgconv v1.1.13 github.com/vmihailenco/msgpack/v5 v5.4.1 go.mongodb.org/mongo-driver/v2 v2.0.1 + go.uber.org/automaxprocs v1.6.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 golang.org/x/crypto v0.35.0 golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa golang.org/x/net v0.35.0 + golang.org/x/sync v0.11.0 golang.org/x/time v0.10.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 gorm.io/driver/clickhouse v0.6.1 @@ -166,7 +168,6 @@ require ( go.opentelemetry.io/otel/trace v1.28.0 // indirect golang.org/x/arch v0.13.0 // indirect golang.org/x/image v0.23.0 // indirect - golang.org/x/sync v0.11.0 // indirect golang.org/x/sys v0.30.0 // indirect golang.org/x/text v0.22.0 // indirect google.golang.org/protobuf v1.36.2 // indirect diff --git a/go.sum b/go.sum index 506b637..6b12c16 100644 --- a/go.sum +++ b/go.sum @@ -310,6 +310,8 @@ github.com/pkg/sftp v1.13.7/go.mod h1:KMKI0t3T6hfA+lTR/ssZdunHo+uwq7ghoN09/FSu3D github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v1.21.0 h1:DIsaGmiaBkSangBgMtWdNfxbMNdku5IK6iNhrEqWvdA= github.com/prometheus/client_golang v1.21.0/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= @@ -412,6 +414,8 @@ go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucg go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=