Commit 02d8da09 authored by Brian Tiger Chow's avatar Brian Tiger Chow

fix(2/init) message displayed during init

TODO use a writer to get the command output

resulting appearance:
```
go-ipfs (feat/machine-readable-logging) λ. make install_2; ipfs2 init -f
cd cmd/ipfs2 && go install
initializing ipfs node at /Users/btc/.go-ipfs
generating key pair...
peer identity: %s QmcPLgrqfvnneJ3vr3oGpkTiS9Psx8p3HxevjnoZYToDRm
```

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent e906dcd8
...@@ -209,7 +209,7 @@ func identityConfig(nbits int) (config.Identity, error) { ...@@ -209,7 +209,7 @@ func identityConfig(nbits int) (config.Identity, error) {
return ident, errors.New("Bitsize less than 1024 is considered unsafe.") return ident, errors.New("Bitsize less than 1024 is considered unsafe.")
} }
fmt.Printf("generating key pair...") fmt.Println("generating key pair...")
sk, pk, err := ci.GenerateKeyPair(ci.RSA, nbits) sk, pk, err := ci.GenerateKeyPair(ci.RSA, nbits)
if err != nil { if err != nil {
return ident, err return ident, err
...@@ -228,7 +228,7 @@ func identityConfig(nbits int) (config.Identity, error) { ...@@ -228,7 +228,7 @@ func identityConfig(nbits int) (config.Identity, error) {
return ident, err return ident, err
} }
ident.PeerID = id.Pretty() ident.PeerID = id.Pretty()
fmt.Println("generating key pair...") fmt.Println("peer identity: %s", id.Pretty())
return ident, nil return ident, nil
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment