Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
8d4c2169
Commit
8d4c2169
authored
10 years ago
by
Brian Tiger Chow
Committed by
Juan Batiz-Benet
10 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
License: MIT Signed-off-by:
Brian Tiger Chow
<
brian@perfmode.com
>
parent
7cebc3cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
cmd/ipfs2/init.go
cmd/ipfs2/init.go
+3
-5
No files found.
cmd/ipfs2/init.go
View file @
8d4c2169
...
...
@@ -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
(
"
\n
to 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
(
"
\n
to get started, enter: ipfs cat %s
\n
"
,
k
)
return
nil
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment