(validate semver.Range)
| 128 | } |
| 129 | |
| 130 | func makeHandler(validate semver.Range) context.Handler { |
| 131 | return func(ctx *context.Context) { |
| 132 | if !matchVersionRange(ctx, validate) { |
| 133 | // The overlapped handler has an exception |
| 134 | // of a type of context.NotFound (which versioning.ErrNotFound wraps) |
| 135 | // to clear the status code |
| 136 | // and the error to ignore this |
| 137 | // when available match version exists (see `NewGroup`). |
| 138 | if h := NotFoundHandler; h != nil { |
| 139 | h(ctx) |
| 140 | return |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | ctx.Next() |
| 145 | } |
| 146 | } |
no test coverage detected
searching dependent graphs…