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

change ipfs dag get flag name from format to output-codec #8440

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

aschmahmann
Copy link
Contributor

@aschmahmann aschmahmann commented Sep 15, 2021

Change ipfs dag get --format to ipfs dag get --output-codec to be closer to #8439.

TODO: Merge to master after #8439

@@ -109,7 +109,7 @@ format.
cmds.StringArg("ref", true, false, "The object to get").EnableStdin(),
},
Options: []cmds.Option{
cmds.StringOption("format", "f", "Format that the object will be serialized as.").WithDefault("dag-json"),
cmds.StringOption("codec", "c", "Format that the object will be encoded as.").WithDefault("dag-json"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

"c" is used for the global --config. We can either not use a shortcut or come up with a different name/leave things as is.

Copy link
Member

@lidel lidel Sep 23, 2021

Choose a reason for hiding this comment

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

I don't think short notation adds value here, I'm for just removing it (see #8439 (comment) for rationale)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Going to remove the shortcut and change to --output-codec to clarify that the stored data is being transcoded per #8439 (comment).

@aschmahmann aschmahmann mentioned this pull request Sep 27, 2021
5 tasks
@aschmahmann aschmahmann force-pushed the feat/change-dag-get-flag-name branch 3 times, most recently from 6a8a51b to a18c9b4 Compare September 27, 2021 19:09
@aschmahmann aschmahmann marked this pull request as ready for review September 27, 2021 20:25
format, _ := req.Options["format"].(string)
var fCodec mc.Code
if err := fCodec.Set(format); err != nil {
codecStr, _ := req.Options["output-codec"].(string)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This lack of error handling seems wrong, although this pattern is all over the commands lib usage so likely not too big a problem

@aschmahmann aschmahmann changed the base branch from master to feat/change-dag-put-flag-names September 27, 2021 20:28
@aschmahmann aschmahmann changed the title change ipfs dag get flag name from format to codec change ipfs dag get flag name from format to output-codec Sep 27, 2021
Base automatically changed from feat/change-dag-put-flag-names to master September 27, 2021 21:37
@aschmahmann aschmahmann merged commit 51893f6 into master Sep 27, 2021
@aschmahmann aschmahmann deleted the feat/change-dag-get-flag-name branch September 27, 2021 21:37
@aschmahmann aschmahmann mentioned this pull request Dec 1, 2021
80 tasks
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