first commit

This commit is contained in:
2026-06-22 14:31:01 +05:00
commit 109e01a656
35 changed files with 2120 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
package httpx
import "context"
type userIDKey struct{}
func WithUserID(ctx context.Context, userID int64) context.Context {
return context.WithValue(ctx, userIDKey{}, userID)
}
func UserID(ctx context.Context) (int64, bool) {
v, ok := ctx.Value(userIDKey{}).(int64)
return v, ok
}