(key string)
| 1233 | } |
| 1234 | |
| 1235 | func (r *requestRegistry) get(key string) (bool, error) { |
| 1236 | r.Lock() |
| 1237 | defer r.Unlock() |
| 1238 | v, ok := r.r[key] |
| 1239 | if !ok { |
| 1240 | return false, fmt.Errorf("no such key") |
| 1241 | } |
| 1242 | return v, nil |
| 1243 | } |
| 1244 | |
| 1245 | func TestCalcQueryParamsHash(t *testing.T) { |
| 1246 | testCases := []struct { |