-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Name context functions consistently #481
Name context functions consistently #481
Conversation
02e476d
to
dd89378
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I support consistency. :-)
For the record: If you asked what I prefer, I think I'd prefer to see functions like CurrentMap(ctx)
as opposed to MapFromContext(ctx)
, CurrentSpan(ctx)
as opposed to SpanFromContext(ctx)
, ...
And |
It would be nice to follow a single schema for naming context functions. In the trace package we followed the form FooFromContext and ContextWithFoo. Do the same in the correlation package. The schema WithFoo is mainly used for functions following the options pattern. Not sure about a name of the NewContext function, though. For now I have left it alone.
dd89378
to
c479226
Compare
It would be nice to follow a single schema for naming context
functions. In the trace package we followed the form FooFromContext
and ContextWithFoo. Do the same in the correlation package. The schema
WithFoo is mainly used for functions following the options pattern.
Not sure about a name of the NewContext function, though. For now I
have left it alone.