(val string)
| 2209 | } |
| 2210 | |
| 2211 | func interpretVFloatOrUid(val string) ([]float32, uint64, error) { |
| 2212 | vf, err := types.ParseVFloat(val) |
| 2213 | if err == nil { |
| 2214 | return vf, 0, nil |
| 2215 | } |
| 2216 | uid, err := strconv.ParseUint(val, 0, 64) |
| 2217 | if err == nil { |
| 2218 | return nil, uid, nil |
| 2219 | } |
| 2220 | return nil, uid, errors.Errorf("Value %q is not a uid or vector", val) |
| 2221 | } |
| 2222 | |
| 2223 | // ServeTask is used to respond to a query. |
| 2224 | func (w *grpcWorker) ServeTask(ctx context.Context, q *pb.Query) (*pb.Result, error) { |
no test coverage detected