withInstance adds the instance id to the context.
(ctx context.Context, i *models.Instance)
| 98 | |
| 99 | // withInstance adds the instance id to the context. |
| 100 | func withInstance(ctx context.Context, i *models.Instance) context.Context { |
| 101 | return context.WithValue(ctx, instanceKey, i) |
| 102 | } |
| 103 | |
| 104 | // getInstance reads the instance id from the context. |
| 105 | func getInstance(ctx context.Context) *models.Instance { |
no outgoing calls
no test coverage detected
searching dependent graphs…