Commit abb0b800 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

Key.Bytes.

parent ab01561f
...@@ -46,6 +46,11 @@ func (k Key) String() string { ...@@ -46,6 +46,11 @@ func (k Key) String() string {
return k.string return k.string
} }
// Returns the bytes value of Key
func (k Key) Bytes() []byte {
return []byte(k.string)
}
// Returns the `list` representation of this Key. // Returns the `list` representation of this Key.
// NewKey("/Comedy/MontyPython/Actor:JohnCleese").List() // NewKey("/Comedy/MontyPython/Actor:JohnCleese").List()
// ["Comedy", "MontyPythong", "Actor:JohnCleese"] // ["Comedy", "MontyPythong", "Actor:JohnCleese"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment