FromBool converts the given boolean in to a pb.TaskValue object.
(val bool)
| 35 | |
| 36 | // FromBool converts the given boolean in to a pb.TaskValue object. |
| 37 | func FromBool(val bool) *pb.TaskValue { |
| 38 | if val { |
| 39 | return FromInt(1) |
| 40 | } |
| 41 | return FromInt(0) |
| 42 | } |
| 43 | |
| 44 | // ToBool converts the given pb.TaskValue object into a boolean. |
| 45 | func ToBool(val *pb.TaskValue) bool { |
no test coverage detected
searching dependent graphs…