Init commit

This commit is contained in:
世界
2022-07-01 16:58:18 +08:00
commit 60691819b1
39 changed files with 2202 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
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()}
}