Skip to content

Commit

Permalink
feat: Simplify NewDB function by removing error return
Browse files Browse the repository at this point in the history
  • Loading branch information
Laisky committed Feb 5, 2025
1 parent 286afad commit 127a22b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/db/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ type DB struct {
}

// NewDB creates a new DB instance
func NewDB(opt *redis.Options) (*DB, error) {
func NewDB(opt *redis.Options) *DB {
rdb := redis.NewClient(opt)
rutils := gredis.NewRedisUtils(rdb)

return &DB{
db: rutils,
}, nil
}
}

0 comments on commit 127a22b

Please sign in to comment.