mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 11:29:36 +03:00
Run core/format.go
This commit is contained in:
@ -26,7 +26,8 @@ func MustFromContext(ctx context.Context) *Instance {
|
||||
return x
|
||||
}
|
||||
|
||||
/* toContext returns ctx from the given context, or creates an Instance if the context doesn't find that.
|
||||
/*
|
||||
toContext returns ctx from the given context, or creates an Instance if the context doesn't find that.
|
||||
|
||||
It is unsupported to use this function to create a context that is suitable to invoke Xray's internal component
|
||||
in third party code, you shouldn't use //go:linkname to alias of this function into your own package and
|
||||
@ -34,7 +35,6 @@ use this function in your third party code.
|
||||
|
||||
For third party code, usage enabled by creating a context to interact with Xray's internal component is unsupported,
|
||||
and may break at any time.
|
||||
|
||||
*/
|
||||
func toContext(ctx context.Context, v *Instance) context.Context {
|
||||
if FromContext(ctx) != v {
|
||||
@ -43,7 +43,8 @@ func toContext(ctx context.Context, v *Instance) context.Context {
|
||||
return ctx
|
||||
}
|
||||
|
||||
/*ToBackgroundDetachedContext create a detached context from another context
|
||||
/*
|
||||
ToBackgroundDetachedContext create a detached context from another context
|
||||
Internal API
|
||||
*/
|
||||
func ToBackgroundDetachedContext(ctx context.Context) context.Context {
|
||||
|
Reference in New Issue
Block a user