mirror of
				https://github.com/bufanyun/hotgo.git
				synced 2025-11-04 08:13:45 +08:00 
			
		
		
		
	Upgrade all libs and cleanup code
This commit is contained in:
		
							
								
								
									
										153
									
								
								server/go.mod
									
									
									
									
									
								
							
							
						
						
									
										153
									
								
								server/go.mod
									
									
									
									
									
								
							@@ -1,85 +1,92 @@
 | 
			
		||||
module hotgo
 | 
			
		||||
 | 
			
		||||
go 1.21
 | 
			
		||||
 | 
			
		||||
toolchain go1.22.1
 | 
			
		||||
go 1.23.0
 | 
			
		||||
 | 
			
		||||
require (
 | 
			
		||||
	github.com/Shopify/sarama v1.34.1
 | 
			
		||||
	github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.8
 | 
			
		||||
	github.com/alibabacloud-go/dysmsapi-20170525/v3 v3.0.5
 | 
			
		||||
	github.com/alibabacloud-go/tea v1.2.1
 | 
			
		||||
	github.com/alibabacloud-go/tea-utils/v2 v2.0.5
 | 
			
		||||
	github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible
 | 
			
		||||
	github.com/IBM/sarama v1.43.3
 | 
			
		||||
	github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.9
 | 
			
		||||
	github.com/alibabacloud-go/dysmsapi-20170525/v3 v3.0.6
 | 
			
		||||
	github.com/alibabacloud-go/tea v1.2.2
 | 
			
		||||
	github.com/alibabacloud-go/tea-utils/v2 v2.0.6
 | 
			
		||||
	github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
 | 
			
		||||
	github.com/apache/rocketmq-client-go/v2 v2.1.2
 | 
			
		||||
	github.com/casbin/casbin/v2 v2.55.0
 | 
			
		||||
	github.com/forgoer/openssl v1.4.0
 | 
			
		||||
	github.com/go-pay/gopay v1.5.91
 | 
			
		||||
	github.com/casbin/casbin/v2 v2.99.0
 | 
			
		||||
	github.com/forgoer/openssl v1.6.0
 | 
			
		||||
	github.com/go-pay/crypto v0.0.1
 | 
			
		||||
	github.com/go-pay/gopay v1.5.104
 | 
			
		||||
	github.com/gogf/gf/contrib/drivers/mysql/v2 v2.7.2
 | 
			
		||||
	github.com/gogf/gf/contrib/nosql/redis/v2 v2.7.2
 | 
			
		||||
	github.com/gogf/gf/contrib/trace/jaeger/v2 v2.7.2
 | 
			
		||||
	github.com/gogf/gf/v2 v2.7.2
 | 
			
		||||
	github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f
 | 
			
		||||
	github.com/golang-jwt/jwt/v5 v5.2.0
 | 
			
		||||
	github.com/golang-jwt/jwt/v5 v5.2.1
 | 
			
		||||
	github.com/gorilla/websocket v1.5.3
 | 
			
		||||
	github.com/kayon/iploc v0.0.0-20200312105652-bda3e968a794
 | 
			
		||||
	github.com/minio/minio-go/v7 v7.0.63
 | 
			
		||||
	github.com/minio/minio-go/v7 v7.0.76
 | 
			
		||||
	github.com/mojocn/base64Captcha v1.3.6
 | 
			
		||||
	github.com/olekukonko/tablewriter v0.0.5
 | 
			
		||||
	github.com/qiniu/go-sdk/v7 v7.14.0
 | 
			
		||||
	github.com/shirou/gopsutil/v3 v3.23.3
 | 
			
		||||
	github.com/silenceper/wechat/v2 v2.1.4
 | 
			
		||||
	github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.633
 | 
			
		||||
	github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.633
 | 
			
		||||
	github.com/tencentyun/cos-go-sdk-v5 v0.7.45
 | 
			
		||||
	github.com/ufilesdk-dev/ufile-gosdk v1.0.3
 | 
			
		||||
	github.com/qiniu/go-sdk/v7 v7.21.1
 | 
			
		||||
	github.com/shirou/gopsutil/v3 v3.24.5
 | 
			
		||||
	github.com/silenceper/wechat/v2 v2.1.6
 | 
			
		||||
	github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.993
 | 
			
		||||
	github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.993
 | 
			
		||||
	github.com/tencentyun/cos-go-sdk-v5 v0.7.54
 | 
			
		||||
	github.com/ufilesdk-dev/ufile-gosdk v1.0.4
 | 
			
		||||
	github.com/xuri/excelize/v2 v2.6.0
 | 
			
		||||
	go.opentelemetry.io/otel v1.28.0
 | 
			
		||||
	golang.org/x/mod v0.17.0
 | 
			
		||||
	golang.org/x/net v0.27.0
 | 
			
		||||
	golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d
 | 
			
		||||
	go.opentelemetry.io/otel v1.29.0
 | 
			
		||||
	golang.org/x/mod v0.20.0
 | 
			
		||||
	golang.org/x/net v0.28.0
 | 
			
		||||
	golang.org/x/tools v0.24.0
 | 
			
		||||
	gopkg.in/yaml.v3 v3.0.1
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
require (
 | 
			
		||||
	aead.dev/minisign v0.2.0 // indirect
 | 
			
		||||
	aead.dev/minisign v0.3.0 // indirect
 | 
			
		||||
	filippo.io/edwards25519 v1.1.0 // indirect
 | 
			
		||||
	github.com/BurntSushi/toml v1.4.0 // indirect
 | 
			
		||||
	github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
 | 
			
		||||
	github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 // indirect
 | 
			
		||||
	github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect
 | 
			
		||||
	github.com/alibabacloud-go/endpoint-util v1.1.0 // indirect
 | 
			
		||||
	github.com/alibabacloud-go/openapi-util v0.1.0 // indirect
 | 
			
		||||
	github.com/alibabacloud-go/tea-utils v1.3.1 // indirect
 | 
			
		||||
	github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82 // indirect
 | 
			
		||||
	github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5 // indirect
 | 
			
		||||
	github.com/alibabacloud-go/debug v1.0.1 // indirect
 | 
			
		||||
	github.com/alibabacloud-go/endpoint-util v1.1.1 // indirect
 | 
			
		||||
	github.com/alibabacloud-go/openapi-util v0.1.1 // indirect
 | 
			
		||||
	github.com/alibabacloud-go/tea-xml v1.1.3 // indirect
 | 
			
		||||
	github.com/aliyun/credentials-go v1.3.1 // indirect
 | 
			
		||||
	github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d // indirect
 | 
			
		||||
	github.com/aliyun/credentials-go v1.3.9 // indirect
 | 
			
		||||
	github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
 | 
			
		||||
	github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 // indirect
 | 
			
		||||
	github.com/casbin/govaluate v1.2.0 // indirect
 | 
			
		||||
	github.com/cespare/xxhash/v2 v2.3.0 // indirect
 | 
			
		||||
	github.com/clbanning/mxj v1.8.4 // indirect
 | 
			
		||||
	github.com/clbanning/mxj/v2 v2.7.0 // indirect
 | 
			
		||||
	github.com/davecgh/go-spew v1.1.1 // indirect
 | 
			
		||||
	github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
 | 
			
		||||
	github.com/dustin/go-humanize v1.0.1 // indirect
 | 
			
		||||
	github.com/eapache/go-resiliency v1.2.0 // indirect
 | 
			
		||||
	github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
 | 
			
		||||
	github.com/eapache/go-resiliency v1.7.0 // indirect
 | 
			
		||||
	github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
 | 
			
		||||
	github.com/eapache/queue v1.1.0 // indirect
 | 
			
		||||
	github.com/emirpasic/gods v1.18.1 // indirect
 | 
			
		||||
	github.com/fatih/color v1.17.0 // indirect
 | 
			
		||||
	github.com/fatih/structs v1.1.0 // indirect
 | 
			
		||||
	github.com/fsnotify/fsnotify v1.7.0 // 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-ole/go-ole v1.2.6 // indirect
 | 
			
		||||
	github.com/go-ole/go-ole v1.3.0 // indirect
 | 
			
		||||
	github.com/go-pay/errgroup v0.0.2 // indirect
 | 
			
		||||
	github.com/go-pay/util v0.0.4 // indirect
 | 
			
		||||
	github.com/go-pay/xlog v0.0.3 // indirect
 | 
			
		||||
	github.com/go-pay/xtime v0.0.2 // 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.3 // indirect
 | 
			
		||||
	github.com/gofrs/flock v0.12.1 // indirect
 | 
			
		||||
	github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
 | 
			
		||||
	github.com/golang/mock v1.6.0 // indirect
 | 
			
		||||
	github.com/golang/snappy v0.0.4 // indirect
 | 
			
		||||
	github.com/google/btree v1.1.2 // indirect
 | 
			
		||||
	github.com/google/go-querystring v1.0.0 // indirect
 | 
			
		||||
	github.com/google/btree v1.1.3 // indirect
 | 
			
		||||
	github.com/google/go-querystring v1.1.0 // indirect
 | 
			
		||||
	github.com/google/uuid v1.6.0 // indirect
 | 
			
		||||
	github.com/grokify/html-strip-tags-go v0.1.0 // indirect
 | 
			
		||||
	github.com/hashicorp/errwrap v1.0.0 // indirect
 | 
			
		||||
	github.com/hashicorp/errwrap v1.1.0 // indirect
 | 
			
		||||
	github.com/hashicorp/go-multierror v1.1.1 // indirect
 | 
			
		||||
	github.com/hashicorp/go-uuid v1.0.3 // indirect
 | 
			
		||||
	github.com/jcmturner/aescts/v2 v2.0.0 // indirect
 | 
			
		||||
@@ -88,54 +95,54 @@ require (
 | 
			
		||||
	github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
 | 
			
		||||
	github.com/jcmturner/rpc/v2 v2.0.3 // indirect
 | 
			
		||||
	github.com/json-iterator/go v1.1.12 // indirect
 | 
			
		||||
	github.com/klauspost/compress v1.17.2 // indirect
 | 
			
		||||
	github.com/klauspost/cpuid/v2 v2.2.5 // indirect
 | 
			
		||||
	github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
 | 
			
		||||
	github.com/klauspost/compress v1.17.9 // indirect
 | 
			
		||||
	github.com/klauspost/cpuid/v2 v2.2.8 // indirect
 | 
			
		||||
	github.com/lufia/plan9stats v0.0.0-20240819163618-b1d8f4d146e7 // indirect
 | 
			
		||||
	github.com/magiconair/properties v1.8.7 // indirect
 | 
			
		||||
	github.com/matishsiao/goInfo v0.0.0-20210923090445-da2e3fa8d45f // indirect
 | 
			
		||||
	github.com/mattn/go-colorable v0.1.13 // indirect
 | 
			
		||||
	github.com/mattn/go-isatty v0.0.20 // indirect
 | 
			
		||||
	github.com/mattn/go-runewidth v0.0.15 // indirect
 | 
			
		||||
	github.com/mattn/go-runewidth v0.0.16 // indirect
 | 
			
		||||
	github.com/minio/md5-simd v1.1.2 // indirect
 | 
			
		||||
	github.com/minio/sha256-simd v1.0.1 // indirect
 | 
			
		||||
	github.com/mitchellh/mapstructure v1.4.3 // 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
 | 
			
		||||
	github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
 | 
			
		||||
	github.com/mozillazg/go-httpheader v0.2.1 // indirect
 | 
			
		||||
	github.com/mozillazg/go-httpheader v0.4.0 // indirect
 | 
			
		||||
	github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
 | 
			
		||||
	github.com/pierrec/lz4/v4 v4.1.18 // indirect
 | 
			
		||||
	github.com/pierrec/lz4/v4 v4.1.21 // indirect
 | 
			
		||||
	github.com/pkg/errors v0.9.1 // indirect
 | 
			
		||||
	github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
 | 
			
		||||
	github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
 | 
			
		||||
	github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
 | 
			
		||||
	github.com/redis/go-redis/v9 v9.6.0 // indirect
 | 
			
		||||
	github.com/redis/go-redis/v9 v9.6.1 // indirect
 | 
			
		||||
	github.com/richardlehane/mscfb v1.0.4 // indirect
 | 
			
		||||
	github.com/richardlehane/msoleps v1.0.1 // indirect
 | 
			
		||||
	github.com/richardlehane/msoleps v1.0.3 // indirect
 | 
			
		||||
	github.com/rivo/uniseg v0.4.7 // indirect
 | 
			
		||||
	github.com/rs/xid v1.5.0 // indirect
 | 
			
		||||
	github.com/shoenig/go-m1cpu v0.1.4 // indirect
 | 
			
		||||
	github.com/rs/xid v1.6.0 // indirect
 | 
			
		||||
	github.com/shoenig/go-m1cpu v0.1.6 // indirect
 | 
			
		||||
	github.com/sirupsen/logrus v1.9.3 // indirect
 | 
			
		||||
	github.com/spf13/cast v1.4.1 // indirect
 | 
			
		||||
	github.com/tidwall/gjson v1.14.1 // indirect
 | 
			
		||||
	github.com/spf13/cast v1.7.0 // indirect
 | 
			
		||||
	github.com/tidwall/gjson v1.17.3 // indirect
 | 
			
		||||
	github.com/tidwall/match v1.1.1 // indirect
 | 
			
		||||
	github.com/tidwall/pretty v1.2.0 // indirect
 | 
			
		||||
	github.com/tjfoc/gmsm v1.3.2 // indirect
 | 
			
		||||
	github.com/tklauser/go-sysconf v0.3.11 // indirect
 | 
			
		||||
	github.com/tklauser/numcpus v0.6.0 // indirect
 | 
			
		||||
	github.com/xuri/efp v0.0.0-20220407160117-ad0f7a785be8 // indirect
 | 
			
		||||
	github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect
 | 
			
		||||
	github.com/yusufpapurcu/wmi v1.2.2 // indirect
 | 
			
		||||
	github.com/tidwall/pretty v1.2.1 // indirect
 | 
			
		||||
	github.com/tjfoc/gmsm v1.4.1 // indirect
 | 
			
		||||
	github.com/tklauser/go-sysconf v0.3.14 // indirect
 | 
			
		||||
	github.com/tklauser/numcpus v0.8.0 // indirect
 | 
			
		||||
	github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect
 | 
			
		||||
	github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 // indirect
 | 
			
		||||
	github.com/yusufpapurcu/wmi v1.2.4 // indirect
 | 
			
		||||
	go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect
 | 
			
		||||
	go.opentelemetry.io/otel/metric v1.28.0 // indirect
 | 
			
		||||
	go.opentelemetry.io/otel/sdk v1.28.0 // indirect
 | 
			
		||||
	go.opentelemetry.io/otel/trace v1.28.0 // indirect
 | 
			
		||||
	go.uber.org/atomic v1.7.0 // indirect
 | 
			
		||||
	golang.org/x/crypto v0.25.0 // indirect
 | 
			
		||||
	golang.org/x/image v0.13.0 // indirect
 | 
			
		||||
	golang.org/x/sync v0.7.0 // indirect
 | 
			
		||||
	golang.org/x/sys v0.22.0 // indirect
 | 
			
		||||
	golang.org/x/text v0.16.0 // indirect
 | 
			
		||||
	golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
 | 
			
		||||
	go.opentelemetry.io/otel/metric v1.29.0 // indirect
 | 
			
		||||
	go.opentelemetry.io/otel/sdk v1.29.0 // indirect
 | 
			
		||||
	go.opentelemetry.io/otel/trace v1.29.0 // indirect
 | 
			
		||||
	go.uber.org/atomic v1.11.0 // indirect
 | 
			
		||||
	golang.org/x/crypto v0.26.0 // indirect
 | 
			
		||||
	golang.org/x/image v0.19.0 // indirect
 | 
			
		||||
	golang.org/x/sync v0.8.0 // indirect
 | 
			
		||||
	golang.org/x/sys v0.24.0 // indirect
 | 
			
		||||
	golang.org/x/text v0.17.0 // indirect
 | 
			
		||||
	golang.org/x/time v0.6.0 // indirect
 | 
			
		||||
	gopkg.in/ini.v1 v1.67.0 // indirect
 | 
			
		||||
	gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
 | 
			
		||||
	gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
 | 
			
		||||
	stathat.com/c/consistent v1.0.0 // indirect
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										669
									
								
								server/go.sum
									
									
									
									
									
								
							
							
						
						
									
										669
									
								
								server/go.sum
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -111,14 +111,19 @@ func loadPermissions(ctx context.Context) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Clear(ctx context.Context) (err error) {
 | 
			
		||||
	_, err = Enforcer.RemovePolicies(Enforcer.GetPolicy())
 | 
			
		||||
	policy, err := Enforcer.GetPolicy()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		g.Log().Warningf(ctx, "Enforcer RemovePolicies err:%+v", err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	_, err = Enforcer.RemovePolicies(policy)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		g.Log().Warningf(ctx, "Enforcer RemovePolicies err:%+v", err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// 检查是否清理干净
 | 
			
		||||
	if len(Enforcer.GetPolicy()) > 0 {
 | 
			
		||||
	if len(policy) > 0 {
 | 
			
		||||
		return Clear(ctx)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
 
 | 
			
		||||
@@ -8,8 +8,8 @@ package wxpay
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"crypto/rsa"
 | 
			
		||||
	"github.com/go-pay/crypto/xpem"
 | 
			
		||||
	"github.com/go-pay/gopay"
 | 
			
		||||
	"github.com/go-pay/gopay/pkg/xpem"
 | 
			
		||||
	"github.com/go-pay/gopay/wechat/v3"
 | 
			
		||||
	"github.com/gogf/gf/v2/errors/gerror"
 | 
			
		||||
	"github.com/gogf/gf/v2/net/ghttp"
 | 
			
		||||
@@ -88,7 +88,7 @@ func (h *wxPay) Notify(ctx context.Context, in payin.NotifyInp) (res *payin.Noti
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	notify, err := notifyReq.DecryptCipherText(h.config.WxPayAPIv3Key)
 | 
			
		||||
	notify, err := notifyReq.DecryptPayCipherText(h.config.WxPayAPIv3Key)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@ package queue
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"github.com/Shopify/sarama"
 | 
			
		||||
	"github.com/IBM/sarama"
 | 
			
		||||
	"github.com/gogf/gf/v2/errors/gerror"
 | 
			
		||||
	"github.com/gogf/gf/v2/frame/g"
 | 
			
		||||
	"hotgo/internal/consts"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user