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
9356e1a0
Commit
9356e1a0
authored
10 years ago
by
Matt Bell
Committed by
Juan Batiz-Benet
10 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/ipfs: Moved private commands to core/commands2
parent
fb125308
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
21 deletions
+13
-21
cmd/ipfs2/ipfs.go
cmd/ipfs2/ipfs.go
+0
-15
core/commands2/cat.go
core/commands2/cat.go
+1
-1
core/commands2/daemon.go
core/commands2/daemon.go
+2
-1
core/commands2/init.go
core/commands2/init.go
+2
-1
core/commands2/ls.go
core/commands2/ls.go
+1
-1
core/commands2/root.go
core/commands2/root.go
+7
-2
No files found.
cmd/ipfs2/ipfs.go
deleted
100644 → 0
View file @
fb125308
package
main
import
(
cmds
"github.com/jbenet/go-ipfs/commands"
commands
"github.com/jbenet/go-ipfs/core/commands2"
)
var
Root
=
&
cmds
.
Command
{
Options
:
commands
.
Root
.
Options
,
Help
:
commands
.
Root
.
Help
,
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"daemon"
:
daemonCmd
,
"init"
:
initCmd
,
},
}
This diff is collapsed.
Click to expand it.
core/commands2/cat.go
View file @
9356e1a0
...
...
@@ -7,7 +7,7 @@ import (
uio
"github.com/jbenet/go-ipfs/unixfs/io"
)
var
cat
=
&
cmds
.
Command
{
var
cat
Cmd
=
&
cmds
.
Command
{
Help
:
"TODO"
,
Run
:
func
(
res
cmds
.
Response
,
req
cmds
.
Request
)
{
node
:=
req
.
Context
()
.
Node
...
...
This diff is collapsed.
Click to expand it.
c
md/ipf
s2/daemon.go
→
c
ore/command
s2/daemon.go
View file @
9356e1a0
package
main
package
commands
import
(
"fmt"
...
...
@@ -14,6 +14,7 @@ import (
)
var
daemonCmd
=
&
cmds
.
Command
{
Private
:
true
,
Options
:
[]
cmds
.
Option
{},
Help
:
"TODO"
,
Subcommands
:
map
[
string
]
*
cmds
.
Command
{},
...
...
This diff is collapsed.
Click to expand it.
c
md/ipf
s2/init.go
→
c
ore/command
s2/init.go
View file @
9356e1a0
package
main
package
commands
import
(
"encoding/base64"
...
...
@@ -15,6 +15,7 @@ import (
)
var
initCmd
=
&
cmds
.
Command
{
Private
:
true
,
Options
:
[]
cmds
.
Option
{
cmds
.
Option
{[]
string
{
"bits"
,
"b"
},
cmds
.
Int
},
cmds
.
Option
{[]
string
{
"passphrase"
,
"p"
},
cmds
.
String
},
...
...
This diff is collapsed.
Click to expand it.
core/commands2/ls.go
View file @
9356e1a0
...
...
@@ -20,7 +20,7 @@ type LsOutput struct {
Objects
[]
Object
}
var
ls
=
&
cmds
.
Command
{
var
ls
Cmd
=
&
cmds
.
Command
{
Help
:
"TODO"
,
Run
:
func
(
res
cmds
.
Response
,
req
cmds
.
Request
)
{
node
:=
req
.
Context
()
.
Node
...
...
This diff is collapsed.
Click to expand it.
core/commands2/root.go
View file @
9356e1a0
...
...
@@ -51,8 +51,9 @@ Plumbing commands:
Use "ipfs help <command>" for more information about a command.
`
,
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"cat"
:
cat
,
"ls"
:
ls
,
"cat"
:
catCmd
,
"ls"
:
lsCmd
,
"init"
:
initCmd
,
// test subcommands
// TODO: remove these when we don't need them anymore
...
...
@@ -106,3 +107,7 @@ Use "ipfs help <command>" for more information about a command.
},
},
}
func
init
()
{
Root
.
Subcommands
[
"daemon"
]
=
daemonCmd
}
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