mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
Run core/format.go
This commit is contained in:
parent
c9b6fc0104
commit
c4fbdf1b78
18 changed files with 76 additions and 67 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue