getValue gets the value from the task.
(tv *pb.TaskValue)
| 367 | |
| 368 | // getValue gets the value from the task. |
| 369 | func getValue(tv *pb.TaskValue) (types.Val, error) { |
| 370 | vID := types.TypeID(tv.ValType) |
| 371 | val := types.ValueForType(vID) |
| 372 | val.Value = tv.Val |
| 373 | return val, nil |
| 374 | } |
| 375 | |
| 376 | var ( |
| 377 | // ErrEmptyVal is returned when a value is empty. |
no test coverage detected