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

Fix --ipns-base alias #7659

Merged
merged 2 commits into from
Sep 9, 2020
Merged

Fix --ipns-base alias #7659

merged 2 commits into from
Sep 9, 2020

Conversation

aschmahmann
Copy link
Contributor

@aschmahmann aschmahmann commented Sep 8, 2020

This PR first refactors --ipns-base by putting all the options in one location and then removes the empty alias that was being used.

@aschmahmann aschmahmann changed the title Fix/ipns base alias Fix --ipns-base alias Sep 8, 2020
@@ -1,11 +1,14 @@
package keyencode
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any ideas why code coverage is yelling at me here? Is this just because I removed some lines, or is there something sneaky that I've missed? The report looks pretty weird.

const IPNSKeyFormatOptionName = "ipns-base"
const ipnsKeyFormatOptionName = "ipns-base"

var OptionIPNSBase = cmds.StringOption(ipnsKeyFormatOptionName, "Encoding used for keys: Can either be a multibase encoded CID or a base58btc encoded multihash. Takes {b58mh|base36|k|base32|b...}.").WithDefault("base36")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Stebalien Any reason why reusing the same option repeatedly is not recommended?

Copy link
Member

Choose a reason for hiding this comment

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

No, we do that for some shared options. It should be fine.

Copy link
Contributor

@petar petar left a comment

Choose a reason for hiding this comment

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

lgtm

const IPNSKeyFormatOptionName = "ipns-base"
const ipnsKeyFormatOptionName = "ipns-base"

var OptionIPNSBase = cmds.StringOption(ipnsKeyFormatOptionName, "Encoding used for keys: Can either be a multibase encoded CID or a base58btc encoded multihash. Takes {b58mh|base36|k|base32|b...}.").WithDefault("base36")
Copy link
Member

Choose a reason for hiding this comment

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

No, we do that for some shared options. It should be fine.

@aschmahmann aschmahmann merged commit 5d6e129 into master Sep 9, 2020
@aschmahmann aschmahmann mentioned this pull request Feb 18, 2021
73 tasks
@hacdias hacdias deleted the fix/ipns-base-alias branch May 9, 2023 11:00
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.

3 participants