mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-01 14:28:02 +08:00
refactor(init) extract response
This commit is contained in:
parent
1b5e4032ff
commit
3b7983e028
@ -51,7 +51,7 @@ var initCmd = &cmds.Command{
|
||||
nBitsForKeypair = 4096
|
||||
}
|
||||
|
||||
err := foo(res, req.Context().ConfigRoot, dspath, force, nBitsForKeypair)
|
||||
err := foo(req.Context().ConfigRoot, dspath, force, nBitsForKeypair)
|
||||
if err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
return
|
||||
@ -59,7 +59,7 @@ var initCmd = &cmds.Command{
|
||||
},
|
||||
}
|
||||
|
||||
func foo(res cmds.Response, configRoot string, dspath string, force bool, nBitsForKeypair int) error {
|
||||
func foo(configRoot string, dspath string, force bool, nBitsForKeypair int) error {
|
||||
|
||||
u.POut("initializing ipfs node at %s\n", configRoot)
|
||||
filename, err := config.Filename(configRoot)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user