From 8d4c21694cd046144115a899fdedfc93607fa391 Mon Sep 17 00:00:00 2001
From: Brian Tiger Chow <brian.holderchow@gmail.com>
Date: Mon, 17 Nov 2014 21:16:14 -0800
Subject: [PATCH] fix

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
---
 cmd/ipfs2/init.go | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/cmd/ipfs2/init.go b/cmd/ipfs2/init.go
index 4ee8f6f79..2b41befb1 100644
--- a/cmd/ipfs2/init.go
+++ b/cmd/ipfs2/init.go
@@ -105,9 +105,7 @@ func doInit(configRoot string, dspathOverride string, force bool, nBitsForKeypai
 		return nil, err
 	}
 
-	err = addTheWelcomeFile(conf, func(k u.Key) {
-		fmt.Printf("\nto get started, enter: ipfs cat %s\n", k)
-	})
+	err = addTheWelcomeFile(conf)
 	if err != nil {
 		return nil, err
 	}
@@ -117,7 +115,7 @@ func doInit(configRoot string, dspathOverride string, force bool, nBitsForKeypai
 
 // addTheWelcomeFile adds a file containing the welcome message to the newly
 // minted node. On success, it calls onSuccess
-func addTheWelcomeFile(conf *config.Config, onSuccess func(u.Key)) error {
+func addTheWelcomeFile(conf *config.Config) error {
 	// TODO extract this file creation operation into a function
 	nd, err := core.NewIpfsNode(conf, false)
 	if err != nil {
@@ -137,7 +135,7 @@ func addTheWelcomeFile(conf *config.Config, onSuccess func(u.Key)) error {
 	if err != nil {
 		return fmt.Errorf("failed to write test file: %s", err)
 	}
-	onSuccess(k)
+	fmt.Printf("\nto get started, enter: ipfs cat %s\n", k)
 	return nil
 }
 
-- 
GitLab