(ctx context.Context, endpoint string)
| 149 | } |
| 150 | |
| 151 | func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { |
| 152 | osi := ctx.Value(ContextOperationServerIndices) |
| 153 | if osi != nil { |
| 154 | if operationIndices, ok := osi.(map[string]int); !ok { |
| 155 | return 0, reportError("Invalid type %T should be map[string]int", osi) |
| 156 | } else { |
| 157 | index, ok := operationIndices[endpoint] |
| 158 | if ok { |
| 159 | return index, nil |
| 160 | } |
| 161 | } |
| 162 | } |
| 163 | return getServerIndex(ctx) |
| 164 | } |
| 165 | |
| 166 | func getServerVariables(ctx context.Context) (map[string]string, error) { |
| 167 | sv := ctx.Value(ContextServerVariables) |
no test coverage detected