ToInt converts the given pb.TaskValue object into an integer. Note, this panics if there are not enough bytes in val.Val
(val *pb.TaskValue)
| 29 | // ToInt converts the given pb.TaskValue object into an integer. |
| 30 | // Note, this panics if there are not enough bytes in val.Val |
| 31 | func ToInt(val *pb.TaskValue) int64 { |
| 32 | result := binary.LittleEndian.Uint64(val.Val) |
| 33 | return int64(result) |
| 34 | } |
| 35 | |
| 36 | // FromBool converts the given boolean in to a pb.TaskValue object. |
| 37 | func FromBool(val bool) *pb.TaskValue { |
no outgoing calls
no test coverage detected
searching dependent graphs…