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
b358bb3f
Commit
b358bb3f
authored
Nov 11, 2014
by
Matt Bell
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/ipfs2: Added comment to explain default encoding logic
parent
aea2fce9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
cmd/ipfs2/main.go
cmd/ipfs2/main.go
+2
-0
No files found.
cmd/ipfs2/main.go
View file @
b358bb3f
...
...
@@ -132,6 +132,8 @@ func createRequest(args []string) (cmds.Request, *cmds.Command, error) {
ctx
.
ConfigRoot
=
configPath
ctx
.
Config
=
conf
// if no encoding was specified by user, default to plaintext encoding
// (if command doesn't support plaintext, use JSON instead)
if
!
req
.
Option
(
"encoding"
)
.
Found
()
{
if
req
.
Command
()
.
Marshallers
!=
nil
&&
req
.
Command
()
.
Marshallers
[
cmds
.
Text
]
!=
nil
{
req
.
SetOption
(
"encoding"
,
cmds
.
Text
)
...
...
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