(r *http.Request)
| 35 | type latestBuildContextKey struct{} |
| 36 | |
| 37 | func latestBuildOptional(r *http.Request) (database.WorkspaceBuild, bool) { |
| 38 | wb, ok := r.Context().Value(latestBuildContextKey{}).(database.WorkspaceBuild) |
| 39 | return wb, ok |
| 40 | } |
| 41 | |
| 42 | // LatestBuild returns the Latest Build from the ExtractLatestBuild handler. |
| 43 | func LatestBuild(r *http.Request) database.WorkspaceBuild { |
no test coverage detected