New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add/Cat interface #696
Comments
|
Add could return a path, but it just contains a hash... im fine with it. But its halfway misleading... |
|
At this stage, probably want to involve people unfamiliar with the API. |
|
@travisperson how user friendly do you think |
|
Got bit by the conversion. The key 175 if _, err := coreunix.Cat(n, path.Path(k)); err != nil {
07:08:17.328 DEBUG path: Resolve: ' �x{��+YDŽP�= �36
C�,w(���5a resolver.go:24
07:08:17.328 DEBUG path: given path element is not a base58 string.
resolver.go:39With the new signature, users must perform multiple conversions to satisfy the function. The UX has just taken steps backward. This is the correct use of the new signature... 175 if _, err := coreunix.Cat(n, path.Path(k.String())); err != nil {Now that I have on my user Both Add and Cat must accept/return human-readable Cat must accept a Cat may be intelligent and handle the raw k, err := coreunix.Add(n, r)
r, err := coreunix.Cat(n, k) |
|
I agree with this. I think Cat should perform a set of checks on its input, make sure it contains a base58 encoded hash somewhere, if the user passes in a key, convert it appropriately, etc. I think path should also have |
|
I addressed this in #702 |
|
I think |
|
This issue is quite old. Please ask on https://discuss.ipfs.io and provide some more context. |
jbenet commentedJan 30, 2015
In #664
coreunix.Catnow takes a path. It was nice whenCatandAddwere symmetric. Maybe makeAddreturn a path is the right thing to do? cc @whyrusleeping @briantigerchowThe text was updated successfully, but these errors were encountered: