fix
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committed
Nov 17, 2014 at 21:16 UTC
8d4c21694cd046144115a899fdedfc93607fa391
1 file changed
+3
-5
cmd/ipfs2/init.go
+3
-5
@@ -105,9 +105,7 @@ func doInit(configRoot string, dspathOverride string, force bool, nBitsForKeypai
105
return nil, err
106
}
107
108
- err = addTheWelcomeFile(conf, func(k u.Key) {
109
- fmt.Printf("\nto get started, enter: ipfs cat %s\n", k)
110
- })
108
+ err = addTheWelcomeFile(conf)
109
if err != nil {
110
return nil, err
111
}
@@ -117,7 +115,7 @@ func doInit(configRoot string, dspathOverride string, force bool, nBitsForKeypai
115
116
// addTheWelcomeFile adds a file containing the welcome message to the newly
117
// minted node. On success, it calls onSuccess
120
-func addTheWelcomeFile(conf *config.Config, onSuccess func(u.Key)) error {
118
+func addTheWelcomeFile(conf *config.Config) error {
119
// TODO extract this file creation operation into a function
120
nd, err := core.NewIpfsNode(conf, false)
121
if err != nil {
@@ -137,7 +135,7 @@ func addTheWelcomeFile(conf *config.Config, onSuccess func(u.Key)) error {
135
if err != nil {
136
return fmt.Errorf("failed to write test file: %s", err)
137
}
140
- onSuccess(k)
138
+ fmt.Printf("\nto get started, enter: ipfs cat %s\n", k)
139
return nil
140
}
141