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

Added default values to refs #2582

Merged
merged 1 commit into from
Apr 27, 2016
Merged

Added default values to refs #2582

merged 1 commit into from
Apr 27, 2016

Conversation

RichardLitt
Copy link
Member

License: MIT
Signed-off-by: Richard Littauer richard.littauer@gmail.com

cmds.BoolOption("unique", "u", "Omit duplicate refs from output."),
cmds.BoolOption("recursive", "r", "Recursively list links of child nodes."),
cmds.BoolOption("edges", "e", "Emit edge format.").Default("`<from> -> <to>`"),
cmds.BoolOption("unique", "u", "Omit duplicate refs from output.").Default(false),
Copy link
Member

Choose a reason for hiding this comment

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

do we really need to have Default false on every bool? I think thats implied...

@whyrusleeping
Copy link
Member

@RichardLitt ping

@RichardLitt
Copy link
Member Author

Thanks! Will get to this; haven't forgotten.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
@RichardLitt
Copy link
Member Author

Fixed. I think having Default(false) is still useful - BoolOptions are not always false, which means they should be specified.

@RichardLitt RichardLitt added the need/review Needs a review label Apr 26, 2016
@whyrusleeping
Copy link
Member

@RichardLitt i think its safe to assume that the default is always false (in go, the default value of any bool is false).

@whyrusleeping
Copy link
Member

@jbenet thoughts on this?

@jbenet
Copy link
Member

jbenet commented Apr 27, 2016

not sure if they will always be false. makes sense to me but i dont think it's guaranteed. things may change too, so users may opt to specify for sure just in case.

@whyrusleeping
Copy link
Member

the test failures here appear to be because some of our dockerfile deps no longer work. teamcity is passing because that machine has the early (now broken) layers of the image cached. I'll file an issue to get that fixed but it shouldnt block this PR.

@whyrusleeping whyrusleeping merged commit 1676d0c into master Apr 27, 2016
@whyrusleeping whyrusleeping deleted the feature/refs-defaults branch April 27, 2016 00:11
@momack2 momack2 added this to Needs Review 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
need/review Needs a review
Projects
No open projects
ipfs/go-ipfs
Needs Review
Development

Successfully merging this pull request may close these issues.

None yet

3 participants