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

Function ToInt

task/conversion.go:31–34  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

29// ToInt converts the given pb.TaskValue object into an integer.
30// Note, this panics if there are not enough bytes in val.Val
31func 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.
37func FromBool(val bool) *pb.TaskValue {

Callers 1

ToBoolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…