You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having some trouble with using the bbolt cli.
Following the bbolt document, I created a few buckets, each of their key was generated by NextSequence(), then serialized by itob(). Using those buckets in code is perfectly fine, but accessing them with the CLI has a bit problem.
For example, the first bucket key has the byte representation of [0 0 0 0 0 0 0 1], it is quite impossible for me to type that in the CLI and have bbolt convert it back the correct way. e.g.
Reading from the source code, the cli first read the argv as string, then directly convert them to []byte. And \u0001 being a null character is impossible to type in the cli AFAK. I am attempting to write a PR to solve this in some way, but being a new user of bbolt, I need some advices on the following ideas:
try to look for and resolve any \uXXXX in the input, but this would cause some bucket that have \u in their name to have problem with cli.
add a optional control flag that only valid for the following 1 [bucket], usage: bolt keys PATH [[-u] [BUCKET]...], that will parse the \u within it or treat it as an sequence number.
The text was updated successfully, but these errors were encountered:
I am having some trouble with using the
bbolt
cli.Following the bbolt document, I created a few buckets, each of their key was generated by
NextSequence()
, then serialized byitob()
. Using those buckets in code is perfectly fine, but accessing them with the CLI has a bit problem.For example, the first bucket key has the byte representation of
[0 0 0 0 0 0 0 1]
, it is quite impossible for me to type that in the CLI and havebbolt
convert it back the correct way. e.g.Reading from the source code, the cli first read the argv as
string
, then directly convert them to[]byte
. And\u0001
being a null character is impossible to type in the cli AFAK. I am attempting to write a PR to solve this in some way, but being a new user of bbolt, I need some advices on the following ideas:\uXXXX
in the input, but this would cause some bucket that have\u
in their name to have problem with cli.[bucket]
,usage: bolt keys PATH [[-u] [BUCKET]...]
, that will parse the\u
within it or treat it as an sequence number.The text was updated successfully, but these errors were encountered: