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

Add programatic defaults #2484

Closed
wants to merge 1 commit into from
Closed

Add programatic defaults #2484

wants to merge 1 commit into from

Conversation

RichardLitt
Copy link
Member

Also fixed up a few spelling errors and mistypes, here and there. Got everything I could find.

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

@RichardLitt RichardLitt added RFCR need/review Needs a review exp/wizard Extensive knowledge (implications, ramifications) required topic/docs-ipfs Topic docs-ipfs exp/expert Having worked on the specific codebase is important and removed exp/wizard Extensive knowledge (implications, ramifications) required labels Mar 18, 2016
@@ -22,7 +22,7 @@ Lists running and recently run commands.
res.SetOutput(req.InvocContext().ReqLog.Report())
},
Options: []cmds.Option{
cmds.BoolOption("v", "verbose", "print more verbose output"),
cmds.BoolOption("v", "verbose", "print more verbose 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.

Is it necessary to add Default(false) to every boolean option? I think it can be inferred that the default value is false.

Copy link
Member Author

Choose a reason for hiding this comment

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

They're not always false. We could specify only when default is true? cc @jbenet

Copy link
Member Author

Choose a reason for hiding this comment

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

Going to assume that yes, we should add Default(false) from now on. See #2582 (comment)

@RichardLitt RichardLitt removed exp/expert Having worked on the specific codebase is important need/review Needs a review RFCR labels Mar 22, 2016
@RichardLitt RichardLitt force-pushed the feature/add-defaults branch 2 times, most recently from 88459aa to 6b2f4f2 Compare March 22, 2016 15:44
@whyrusleeping
Copy link
Member

@RichardLitt ping.

RichardLitt added a commit that referenced this pull request May 12, 2016
Specifically, to `repo`, `resolve`, `swarm`, and `version`. Part of #2484.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 12, 2016
I've added: Synopsis, shortDescription, and longDescription for stats and stats bw.
I also added default(false) for poll and default("1s") for interval, and modified the logic to make it fit.

Part of #2484 and #2647.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 12, 2016
Not sure about the switch statement. There may be a more elegant solution.

Part of #2484

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 12, 2016
I've added: Synopsis, shortDescription, and longDescription for stats and stats bw.
I also added default(false) for poll and default("1s") for interval, and modified the logic to make it fit.

Part of #2484 and #2647.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 12, 2016
I've added: Synopsis, shortDescription, and longDescription for stats and stats bw.
I also added default(false) for poll and default("1s") for interval, and modified the logic to make it fit.

Part of #2484 and #2647.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 13, 2016
I've added: Synopsis, shortDescription, and longDescription for stats and stats bw.
I also added default(false) for poll and default("1s") for interval, and modified the logic to make it fit.

Part of #2484 and #2647.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 14, 2016
Part of #2484

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 14, 2016
Added Default logic per #2484, and also added the local option back in, because it exists in the code and should be shown as helptext, at least.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 14, 2016
I've added: Synopsis, shortDescription, and longDescription for stats and stats bw.
I also added default(false) for poll and default("1s") for interval, and modified the logic to make it fit.

Part of #2484 and #2647.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 14, 2016
I've added: Synopsis, shortDescription, and longDescription for stats and stats bw.
I also added default(false) for poll and default("1s") for interval, and modified the logic to make it fit.

Part of #2484 and #2647.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 14, 2016
Not sure about the switch statement. There may be a more elegant solution.

Part of #2484

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 14, 2016
Part of #2484.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 14, 2016
Part of #2484

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 15, 2016
Split from #2484.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 15, 2016
Split from #2484.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 16, 2016
I've added: Synopsis, shortDescription, and longDescription for stats and stats bw.
I also added default(false) for poll and default("1s") for interval, and modified the logic to make it fit.

Part of #2484 and #2647.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
Kubuxu pushed a commit that referenced this pull request May 17, 2016
Part of #2484

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 18, 2016
I didn't bother with Chunker, because I think that is a much wider PR. These should all be solid, though. Redid some of the logic to make it smoother.

Part of #2484.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 18, 2016
Part of #2484

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 19, 2016
Part of #2484

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
Kubuxu pushed a commit that referenced this pull request May 19, 2016
Part of #2484

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
and
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
Kubuxu added a commit that referenced this pull request May 19, 2016
Part of #2484

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
Kubuxu pushed a commit that referenced this pull request May 19, 2016
I didn't bother with Chunker, because I think that is a much wider PR. These should all be solid, though. Redid some of the logic to make it smoother.

Part of #2484.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
Kubuxu pushed a commit that referenced this pull request May 19, 2016
I didn't bother with Chunker, because I think that is a much wider PR. These should all be solid, though. Redid some of the logic to make it smoother.

Part of #2484.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
RichardLitt added a commit that referenced this pull request May 21, 2016
I didn't bother with Chunker, because I think that is a much wider PR. These should all be solid, though. Redid some of the logic to make it smoother.

Part of #2484.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/docs-ipfs Topic docs-ipfs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants