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
3dcae0e0
Commit
3dcae0e0
authored
Nov 07, 2014
by
Brian Tiger Chow
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pin/unpin -> add rm
addresses
https://github.com/jbenet/go-ipfs/pull/263#issuecomment-62242970
parent
852674b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
core/commands2/pin.go
core/commands2/pin.go
+8
-1
core/commands2/root.go
core/commands2/root.go
+3
-1
No files found.
core/commands2/pin.go
View file @
3dcae0e0
...
...
@@ -10,6 +10,13 @@ import (
)
var
pinCmd
=
&
cmds
.
Command
{
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"add"
:
addPinCmd
,
"rm"
:
rmPinCmd
,
},
}
var
addPinCmd
=
&
cmds
.
Command
{
Options
:
[]
cmds
.
Option
{
cmds
.
Option
{[]
string
{
"recursive"
,
"r"
},
cmds
.
Bool
},
cmds
.
Option
{[]
string
{
"depth"
,
"d"
},
cmds
.
Uint
},
...
...
@@ -39,7 +46,7 @@ var pinCmd = &cmds.Command{
},
}
var
unp
inCmd
=
&
cmds
.
Command
{
var
rmP
inCmd
=
&
cmds
.
Command
{
Options
:
[]
cmds
.
Option
{
cmds
.
Option
{[]
string
{
"recursive"
,
"r"
},
cmds
.
Bool
},
},
...
...
core/commands2/root.go
View file @
3dcae0e0
...
...
@@ -64,7 +64,6 @@ var rootSubcommands = map[string]*cmds.Command{
"log"
:
logCmd
,
"net-diag"
:
diagCmd
,
"pin"
:
pinCmd
,
"unpin"
:
unpinCmd
,
"version"
:
versionCmd
,
"config"
:
configCmd
,
"bootstrap"
:
bootstrapCmd
,
...
...
@@ -90,12 +89,14 @@ var rootSubcommands = map[string]*cmds.Command{
},
Type
:
&
TestOutput
{},
},
// TODO rm
"boop"
:
&
cmds
.
Command
{
Run
:
func
(
res
cmds
.
Response
,
req
cmds
.
Request
)
{
v
:=
strings
.
NewReader
(
"hello, world"
)
res
.
SetOutput
(
v
)
},
},
// TODO rm
"warp"
:
&
cmds
.
Command
{
Options
:
[]
cmds
.
Option
{
cmds
.
Option
{[]
string
{
"power"
,
"p"
},
cmds
.
Float
},
...
...
@@ -115,6 +116,7 @@ var rootSubcommands = map[string]*cmds.Command{
}
},
},
// TODO rm
"args"
:
&
cmds
.
Command
{
Run
:
func
(
res
cmds
.
Response
,
req
cmds
.
Request
)
{
res
.
SetOutput
(
req
.
Arguments
())
...
...
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