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
013d98a3
Commit
013d98a3
authored
Nov 12, 2014
by
Brian Tiger Chow
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(2/init, 2/add) fix optionvalue signature
parent
3493e33e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
cmd/ipfs2/init.go
cmd/ipfs2/init.go
+5
-5
core/commands2/add.go
core/commands2/add.go
+1
-1
No files found.
cmd/ipfs2/init.go
View file @
013d98a3
...
...
@@ -27,25 +27,25 @@ var initCmd = &cmds.Command{
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
dspath
,
err
:=
req
.
Option
(
"d"
)
.
String
()
dspath
Override
,
_
,
err
:=
req
.
Option
(
"d"
)
.
String
()
// if !found it's okay. Let == ""
if
err
!=
nil
{
return
nil
,
err
}
force
,
err
:=
req
.
Option
(
"f"
)
.
Bool
()
force
,
_
,
err
:=
req
.
Option
(
"f"
)
.
Bool
()
// if !found, it's okay force == false
if
err
!=
nil
{
return
nil
,
err
}
nBitsForKeypair
,
err
:=
req
.
Option
(
"b"
)
.
Int
()
nBitsForKeypair
,
bitsOptFound
,
err
:=
req
.
Option
(
"b"
)
.
Int
()
if
err
!=
nil
{
return
nil
,
err
}
if
!
req
.
Option
(
"b"
)
.
Found
()
{
if
!
bitsOpt
Found
{
nBitsForKeypair
=
4096
}
return
nil
,
doInit
(
req
.
Context
()
.
ConfigRoot
,
dspath
,
force
,
nBitsForKeypair
)
return
nil
,
doInit
(
req
.
Context
()
.
ConfigRoot
,
dspath
Override
,
force
,
nBitsForKeypair
)
},
}
...
...
core/commands2/add.go
View file @
013d98a3
...
...
@@ -45,7 +45,7 @@ remains to be implemented.
added
:=
&
AddOutput
{}
n
:=
req
.
Context
()
.
Node
recursive
,
err
:=
req
.
Option
(
"r"
)
.
Bool
()
recursive
,
_
,
err
:=
req
.
Option
(
"r"
)
.
Bool
()
if
err
!=
nil
{
return
nil
,
err
}
...
...
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