Skip to content

make RequestCtx's userdata accept keys that are of type: interface{}#1387

Merged
erikdubbelboer merged 1 commit intovalyala:masterfrom
pjebs:master
Oct 6, 2022
Merged

make RequestCtx's userdata accept keys that are of type: interface{}#1387
erikdubbelboer merged 1 commit intovalyala:masterfrom
pjebs:master

Conversation

@pjebs
Copy link
Contributor

@pjebs pjebs commented Sep 30, 2022

See: #1385

server.go Outdated
// visitor must not retain references to key and value after returning.
// Make key and/or value copies if you need storing them after returning.
func (ctx *RequestCtx) VisitUserValues(visitor func([]byte, interface{})) {
func (ctx *RequestCtx) VisitUserValues(visitor func(interface{}, interface{})) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a backwards incompatible change that I don't want to make. Maybe this should only visit the values that have a []byte key and another method should be added for all values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erikdubbelboer Change made.

@pjebs pjebs requested a review from erikdubbelboer October 6, 2022 02:45
@erikdubbelboer erikdubbelboer merged commit d404f2d into valyala:master Oct 6, 2022
@erikdubbelboer
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants