-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Description
handler_go17_test.go
should not use built-in type string as key for value; define your own type to avoid collisions
Description
To prevent clashes across packages using context, the provided key must be similar and should not be of type string or any other built-in type. Users of WithValue must provide their key types.
To avoid allocating when assigning to an interface{}, context keys often have concrete type struct{}. Alternatively, exported context key variables’ static type should be a pointer or interface.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
