Skip to content

Commit

Permalink
Incorporate review from @Kubuxu
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinDrake committed Jul 31, 2017
1 parent be8e8b2 commit 1c1d6ba
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/ipfs/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
namesys "github.com/ipfs/go-ipfs/namesys"
config "github.com/ipfs/go-ipfs/repo/config"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"

ci "gx/ipfs/QmaPbCnUMBohSGo3KnxEa2bHqyJVVeEEcwtqJAYxerieBo/go-libp2p-crypto"
)

Expand Down Expand Up @@ -52,7 +53,7 @@ environment variable:
},
Options: []cmds.Option{
cmds.IntOption("bits", "b", "Number of bits to use in the generated RSA private key.").Default(nBitsForKeypairDefault),
cmds.IntOption("key-type", "k", "Key type (RSA or Ed25519-id").Default(ci.RSA),
cmds.IntOption("key-type", "k", "Key type (RSA or Ed25519-id").Default(keypairTypeDefault),
cmds.BoolOption("empty-repo", "e", "Don't add and pin help files to the local storage.").Default(false),
cmds.StringOption("profile", "p", "Apply profile settings to config. Multiple profiles can be separated by ','"),

Expand Down Expand Up @@ -82,19 +83,19 @@ environment variable:
return
}

empty, _, err := req.Option("e").Bool()
empty, _, err := req.Option("empty-repo").Bool()
if err != nil {
res.SetError(err, cmds.ErrNormal)
return
}

nBitsForKeypair, _, err := req.Option("b").Int()
nBitsForKeypair, _, err := req.Option("bits").Int()
if err != nil {
res.SetError(err, cmds.ErrNormal)
return
}

keyType, _, err := req.Option("k").Int()
keyType, _, err := req.Option("key-type").Int()
if err != nil {
res.SetError(err, cmds.ErrNormal)
return
Expand Down

1 comment on commit 1c1d6ba

@GitCop
Copy link

@GitCop GitCop commented on 1c1d6ba Jul 31, 2017

Choose a reason for hiding this comment

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

There were the following issues with your Pull Request

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

Please sign in to comment.