mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-10 02:53:12 +00:00
16 lines
203 B
Go
16 lines
203 B
Go
package log
|
|
|
|
import (
|
|
"context"
|
|
"math/rand"
|
|
)
|
|
|
|
type idContext struct {
|
|
context.Context
|
|
id uint32
|
|
}
|
|
|
|
func ContextWithID(ctx context.Context) context.Context {
|
|
return &idContext{ctx, rand.Uint32()}
|
|
}
|