Skip to content

Commit

Permalink
chore: 更新go版本至1.22.9并处理兼容性变动
Browse files Browse the repository at this point in the history
  • Loading branch information
XiMo-210 committed Nov 16, 2024
1 parent b1601b0 commit c823d5d
Show file tree
Hide file tree
Showing 4 changed files with 267 additions and 457 deletions.
1 change: 0 additions & 1 deletion app/models/personalInfo.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package models

type PersonalInfo struct {
ID int `json:"id" gorm:"autoIncrement;unique"`
Name string `json:"name"`
Gender string `json:"gender"`
StudentID string `gorm:"primaryKey" json:"student_id"`
Expand Down
6 changes: 4 additions & 2 deletions config/wechat/redis.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package wechat

import (
"github.com/silenceper/wechat/v2/cache"
"context"
"wejh-go/config/redis"

"github.com/silenceper/wechat/v2/cache"
)

func setRedis(wcCache cache.Cache) cache.Cache {
Expand All @@ -14,6 +16,6 @@ func setRedis(wcCache cache.Cache) cache.Cache {
MaxIdle: 10,
IdleTimeout: 60,
}
wcCache = cache.NewRedis(redisOpts)
wcCache = cache.NewRedis(context.Background(), redisOpts)
return wcCache
}
100 changes: 75 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,33 +1,83 @@
module wejh-go

go 1.15
go 1.22.9

require (
github.com/gin-contrib/cors v1.3.1
github.com/gin-contrib/sessions v0.0.3
github.com/gin-gonic/gin v1.7.1
github.com/go-playground/validator/v10 v10.6.1 // indirect
github.com/go-redis/redis/v8 v8.8.2
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0
github.com/gorilla/sessions v1.2.1 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/gin-contrib/cors v1.7.2
github.com/gin-contrib/sessions v1.0.1
github.com/gin-gonic/gin v1.10.0
github.com/go-redis/redis/v8 v8.11.5
github.com/google/uuid v1.6.0
github.com/mitchellh/mapstructure v1.5.0
github.com/pelletier/go-toml v1.9.1 // indirect
github.com/silenceper/wechat/v2 v2.1.7
github.com/spf13/viper v1.19.0
github.com/xuri/excelize/v2 v2.9.0
golang.org/x/sync v0.9.0
gorm.io/driver/mysql v1.5.7
gorm.io/gorm v1.25.12
)

require (
github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff // indirect
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 // indirect
github.com/bytedance/sonic v1.11.6 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.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.20.0 // indirect
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gomodule/redigo v2.0.0+incompatible // indirect
github.com/gorilla/context v1.1.2 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/gorilla/sessions v1.2.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // 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/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/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b // indirect
github.com/silenceper/wechat/v2 v2.0.6
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.4 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.7.1
github.com/ugorji/go v1.2.5 // indirect
github.com/xuri/excelize/v2 v2.8.0
go.opentelemetry.io/otel v0.20.0 // indirect
golang.org/x/sync v0.1.0
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gorm.io/driver/mysql v1.0.6
gorm.io/gorm v1.21.9
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tidwall/gjson v1.14.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit c823d5d

Please sign in to comment.