Compare commits

..

No commits in common. "f67d78b5e6bafb7432199a968671369245db1b8c" and "7509b6c8c66ac68994e668d193c272d2c0c18038" have entirely different histories.

View File

@ -2,8 +2,6 @@ package tool
import (
"context"
"fmt"
"gitea.loveuer.com/yizhisec/packages/opt"
"time"
)
@ -23,7 +21,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
)
@ -38,7 +36,3 @@ func CtxTimeout(ctx context.Context, seconds ...int) context.Context {
return nctx
}
func CtxTrace(ctx context.Context, key string) context.Context {
return context.WithValue(ctx, opt.TraceKey, fmt.Sprintf("%36s", key))
}