ParseNamespaceAttr returns the namespace and attr from the given value.
(attr string)
| 94 | |
| 95 | // ParseNamespaceAttr returns the namespace and attr from the given value. |
| 96 | func ParseNamespaceAttr(attr string) (uint64, string) { |
| 97 | splits := strings.SplitN(attr, NsSeparator, 2) |
| 98 | return strToUint(splits[0]), splits[1] |
| 99 | } |
| 100 | |
| 101 | func ParseNamespaceBytes(attr string) ([]byte, string) { |
| 102 | splits := strings.SplitN(attr, NsSeparator, 2) |