1 Commits

Author SHA1 Message Date
127c57dc3a refactor: rename timeout ctx 2025-07-15 11:43:15 +08:00
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ func New(opts ...OptionFn) (Cache, error) {
Password: password,
})
if err = client.Ping(tool.CtxTimeout(cfg.ctx, 5)).Err(); err != nil {
if err = client.Ping(tool.TimeoutCtx(cfg.ctx, 5)).Err(); err != nil {
return nil, err
}

View File

@ -23,7 +23,7 @@ func Timeout(seconds ...int) (ctx context.Context) {
return
}
func CtxTimeout(ctx context.Context, seconds ...int) context.Context {
func TimeoutCtx(ctx context.Context, seconds ...int) context.Context {
var (
duration time.Duration
)