mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-28 22:08:01 +08:00
refactor(2/init) extract const
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com> # TYPES # feat # fix # docs # style (formatting, missing semi colons, etc; no code change): # refactor # test (adding missing tests, refactoring tests; no production code change) # chore (updating grunt tasks etc; no production code change) Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
This commit is contained in:
parent
81f5d6fd5f
commit
c883f7dc36
@ -19,6 +19,8 @@ import (
|
||||
errors "github.com/jbenet/go-ipfs/util/errors"
|
||||
)
|
||||
|
||||
const nBitsForKeypairDefault = 4096
|
||||
|
||||
var initCmd = &cmds.Command{
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "Initializes IPFS config file",
|
||||
@ -53,7 +55,7 @@ var initCmd = &cmds.Command{
|
||||
return nil, err
|
||||
}
|
||||
if !bitsOptFound {
|
||||
nBitsForKeypair = 4096
|
||||
nBitsForKeypair = nBitsForKeypairDefault
|
||||
}
|
||||
|
||||
return doInit(req.Context().ConfigRoot, dspathOverride, force, nBitsForKeypair)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user