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-unixfs
Commits
edb632a6
Commit
edb632a6
authored
Oct 28, 2014
by
Matt Bell
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/commands: Added a Format function for the 'beep' command
parent
b3ff407d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
core/commands/root.go
core/commands/root.go
+6
-0
No files found.
core/commands/root.go
View file @
edb632a6
...
...
@@ -48,6 +48,12 @@ Use "ipfs help <command>" for more information about a command.
v
:=
TestOutput
{
"hello, world"
,
1337
}
res
.
SetValue
(
v
)
},
Format
:
func
(
res
cmds
.
Response
)
(
string
,
error
)
{
v
:=
res
.
Value
()
.
(
TestOutput
)
s
:=
fmt
.
Sprintf
(
"Foo: %s
\n
"
,
v
.
Foo
)
s
+=
fmt
.
Sprintf
(
"Bar: %v
\n
"
,
v
.
Bar
)
return
s
,
nil
},
},
"boop"
:
&
cmds
.
Command
{
Run
:
func
(
req
cmds
.
Request
,
res
cmds
.
Response
)
{
...
...
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