-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
feat: core.ToContext(ctx, v) for ctx initialization #852
Conversation
Hi, I have to revert some of your change: you have created an exported API, which is an unsupported usage and enable so many other unsupported usages. You shouldn't use
to forcefully export this function into your package to create a context suitable for interact with V2Ray's internal component. |
@xiaokangwang ok. i don't know how to design a func MustToContext (i see there is a func MustFromContext as i created a similar one), and i wait for your opinion on this pr (sorry for no extra comment for this). you can do your way kindly, thanks. |
The reason I did so is that V2Ray have so many internal components that may change behavior at any time, you shouldn't depend on them remain unchanged. You could develop software that interact with them, but it may stop working any time. |
@xiaokangwang thanks for your explaination. maybe there is a purpose to make a public ToContext(ctx, v) for go test.
|
related #831 #841
this brings a method to check and create Instance for ctx, while may someone needs this. (like me ::)