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

Feat/ls headers #951

Merged
merged 1 commit into from
Mar 20, 2015
Merged

Feat/ls headers #951

merged 1 commit into from
Mar 20, 2015

Conversation

cryptix
Copy link
Contributor

@cryptix cryptix commented Mar 20, 2015

Inspired by #372, this fixes #893 .

},
Marshalers: cmds.MarshalerMap{
cmds.Text: func(res cmds.Response) (io.Reader, error) {
output := res.Output().(*LsOutput).Objects

output := res.Output().(*LsOutput)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can get the request object and the options from the response here. Not sure if thats the right way to do it, but its what ive been doing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that's the right way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so,

headers, _, err := res.Request().Option("headers").Bool()

here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah okay, will do.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 79f2792

@jbenet
Copy link
Member

jbenet commented Mar 20, 2015

@cryptix just fixed it! dont worry :) 👍 thanks for this PR!

@jbenet
Copy link
Member

jbenet commented Mar 20, 2015

i'll squash (to make sure every commit passes) when these tests pass.

- added tests for 'ipfs ls --headers'
- comments from CR (opts)
- sharness: fix ls test whitespace
jbenet added a commit that referenced this pull request Mar 20, 2015
@jbenet jbenet merged commit 1f5aa5d into master Mar 20, 2015
@jbenet jbenet deleted the feat/lsHeaders branch March 20, 2015 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ls headers should be a flag
3 participants