Compare commits

..

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

View File

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