MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / FromBool

Function FromBool

task/conversion.go:37–42  ·  view source on GitHub ↗

FromBool converts the given boolean in to a pb.TaskValue object.

(val bool)

Source from the content-addressed store, hash-verified

35
36// FromBool converts the given boolean in to a pb.TaskValue object.
37func 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.
45func ToBool(val *pb.TaskValue) bool {

Callers 1

conversion.goFile · 0.85

Calls 1

FromIntFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…