MCPcopy
hub / github.com/dgraph-io/dgraph / ParseNamespaceBytes

Function ParseNamespaceBytes

x/keys.go:101–106  ·  view source on GitHub ↗
(attr string)

Source from the content-addressed store, hash-verified

99}
100
101func ParseNamespaceBytes(attr string) ([]byte, string) {
102 splits := strings.SplitN(attr, NsSeparator, 2)
103 ns := make([]byte, 8)
104 binary.BigEndian.PutUint64(ns, strToUint(splits[0]))
105 return ns, splits[1]
106}
107
108// ParseAttr returns the attr from the given value.
109func ParseAttr(attr string) string {

Callers 2

toCDCEventFunction · 0.92
generateKeyFunction · 0.70

Calls 1

strToUintFunction · 0.70

Tested by

no test coverage detected