Skip to content

Commit 2cb75ae

Browse files
committed
Change redis error
1 parent df089f9 commit 2cb75ae

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

db/redis/redis.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ func DelRedisObj(key string) {
4747
for iter.Next(ctx) {
4848
err := redis.Del(ctx, iter.Val()).Err()
4949
if err != nil {
50-
panic(err)
50+
panic("Redis error:" + err.Error())
5151
}
5252
}
5353
if err := iter.Err(); err != nil {
54-
panic(err)
54+
panic("Redis error:" + err.Error())
5555
}
5656
}
5757

@@ -66,7 +66,7 @@ func GetRedisObj[T any](key string) *T {
6666
var obj T
6767
err := json.Unmarshal([]byte(status.Val()), &obj)
6868
if err != nil {
69-
log.Panic(err.Error())
69+
panic("Redis error:" + err.Error())
7070
}
7171
return &obj
7272
}

main.go

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ func main() {
2020
g.Use(middleware.Recover)
2121
configs := config.GetConfig()
2222

23+
// g.Static("/bundels", "bundels")
24+
2325
g.GET("/v0.1/public/codepush/update_check", request.Client{}.CheckUpdate)
2426
g.POST("/v0.1/public/codepush/report_status/deploy", request.Client{}.ReportStatus)
2527
g.POST("/v0.1/public/codepush/report_status/download", request.Client{}.Download)

0 commit comments

Comments
 (0)