(arg ref.Val)
| 174 | } |
| 175 | |
| 176 | func hashArg(arg ref.Val) uint64 { |
| 177 | switch v := arg.(type) { |
| 178 | case types.String: |
| 179 | return hashMarkerString*31 + hashString(string(v)) |
| 180 | case types.Bool: |
| 181 | if bool(v) { |
| 182 | return hashMarkerBool*31 + 1 |
| 183 | } |
| 184 | return hashMarkerBool * 31 |
| 185 | case types.Int: |
| 186 | return hashMarkerNumber*31 + numericKey(float64(v)) |
| 187 | case types.Uint: |
| 188 | return hashMarkerNumber*31 + numericKey(float64(v)) |
| 189 | case types.Double: |
| 190 | return hashMarkerNumber*31 + numericKey(float64(v)) |
| 191 | default: |
| 192 | return hashMarkerDefault |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | // hashCall computes the composite bucket key for an async call. |
| 197 | // |
no test coverage detected