effectiveDP returns the project-scoped DataProvider from request context, falling back to the default.
(r *http.Request, defaultDP *DataProvider)
| 107 | // effectiveDP returns the project-scoped DataProvider from request context, |
| 108 | // falling back to the default. |
| 109 | func effectiveDP(r *http.Request, defaultDP *DataProvider) *DataProvider { |
| 110 | if dp, ok := r.Context().Value(projectDPKey).(*DataProvider); ok { |
| 111 | return dp |
| 112 | } |
| 113 | return defaultDP |
| 114 | } |
| 115 | |
| 116 | // effectivePhases returns the project-scoped phases from request context, |
| 117 | // falling back to the default. |
no outgoing calls
no test coverage detected