GoferClientFromContext returns the device gofer client used by ctx.
(ctx context.Context)
| 29 | |
| 30 | // GoferClientFromContext returns the device gofer client used by ctx. |
| 31 | func GoferClientFromContext(ctx context.Context) *GoferClient { |
| 32 | if v := ctx.Value(CtxDevGoferClient); v != nil { |
| 33 | return v.(*GoferClient) |
| 34 | } |
| 35 | return nil |
| 36 | } |
| 37 | |
| 38 | // GoferClientProviderFromContext returns the GoferClientProvider used by ctx. |
| 39 | func GoferClientProviderFromContext(ctx context.Context) GoferClientProvider { |
no test coverage detected
searching dependent graphs…