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
2915007c
Commit
2915007c
authored
Nov 02, 2014
by
Matt Bell
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands: Changed Request arguments to a []interface{}
parent
c70ca4dd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
core/commands2/cat.go
core/commands2/cat.go
+2
-1
core/commands2/ls.go
core/commands2/ls.go
+2
-1
core/commands2/publish.go
core/commands2/publish.go
+2
-2
No files found.
core/commands2/cat.go
View file @
2915007c
...
...
@@ -13,7 +13,8 @@ var catCmd = &cmds.Command{
node
:=
req
.
Context
()
.
Node
readers
:=
make
([]
io
.
Reader
,
0
,
len
(
req
.
Arguments
()))
for
_
,
path
:=
range
req
.
Arguments
()
{
for
_
,
arg
:=
range
req
.
Arguments
()
{
path
:=
arg
.
(
string
)
dagnode
,
err
:=
node
.
Resolver
.
ResolvePath
(
path
)
if
err
!=
nil
{
res
.
SetError
(
err
,
cmds
.
ErrNormal
)
...
...
core/commands2/ls.go
View file @
2915007c
...
...
@@ -26,7 +26,8 @@ var lsCmd = &cmds.Command{
node
:=
req
.
Context
()
.
Node
output
:=
make
([]
Object
,
len
(
req
.
Arguments
()))
for
i
,
path
:=
range
req
.
Arguments
()
{
for
i
,
arg
:=
range
req
.
Arguments
()
{
path
:=
arg
.
(
string
)
dagnode
,
err
:=
node
.
Resolver
.
ResolvePath
(
path
)
if
err
!=
nil
{
res
.
SetError
(
err
,
cmds
.
ErrNormal
)
...
...
core/commands2/publish.go
View file @
2915007c
...
...
@@ -30,12 +30,12 @@ var publishCmd = &cmds.Command{
switch
len
(
args
)
{
case
2
:
// name = args[0]
ref
=
args
[
1
]
ref
=
args
[
1
]
.
(
string
)
res
.
SetError
(
errors
.
New
(
"keychains not yet implemented"
),
cmds
.
ErrNormal
)
return
case
1
:
// name = n.Identity.ID.String()
ref
=
args
[
0
]
ref
=
args
[
0
]
.
(
string
)
default
:
res
.
SetError
(
fmt
.
Errorf
(
"Publish expects 1 or 2 args; got %d."
,
len
(
args
)),
cmds
.
ErrClient
)
...
...
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