Skip to content
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

'Path' type for commands lib Arguments #2721

Open
whyrusleeping opened this issue May 17, 2016 · 6 comments
Open

'Path' type for commands lib Arguments #2721

whyrusleeping opened this issue May 17, 2016 · 6 comments
Labels
exp/expert Having worked on the specific codebase is important good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature

Comments

@whyrusleeping
Copy link
Member

I've wanted a PathArg type for the commands libs that will validate that the content its passed is a valid ipfs path, and allow typed access to that to the consumers of the cmds.Request

@whyrusleeping whyrusleeping added the kind/enhancement A net-new feature or improvement to an existing feature label May 17, 2016
@whyrusleeping
Copy link
Member Author

This would help prevent problems like #2715

@Kubuxu
Copy link
Member

Kubuxu commented May 17, 2016

valid ipfs path means resolve it locally?

@whyrusleeping
Copy link
Member Author

Not resolve locally, but call path.ParsePath on it.

@Kubuxu
Copy link
Member

Kubuxu commented May 17, 2016

Making the check during parsing should be easy. Typed access would be harder and will require changes in most commands definitions.

@whyrusleeping
Copy link
Member Author

Nah, i'm thinking that we add a req.Paths() accessor or something to the request object. This would require changing a lot of command definitions, but would also clean them up dramatically

@djdv
Copy link
Contributor

djdv commented May 18, 2016

Is this pull relevant? #1740

@whyrusleeping whyrusleeping added help wanted Seeking public contribution on this issue exp/expert Having worked on the specific codebase is important labels Aug 23, 2016
@Stebalien Stebalien added the good first issue Good issue for new contributors label Apr 30, 2019
@momack2 momack2 added this to Inbox in ipfs/go-ipfs May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/expert Having worked on the specific codebase is important good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature
Projects
No open projects
Development

No branches or pull requests

4 participants