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-cmds
Commits
bcdf5a77
Commit
bcdf5a77
authored
Jan 12, 2015
by
Matt Bell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/cli: When parsing stdin as string argument, split lines into separate tokens
parent
3638a0d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
cli/parse.go
cli/parse.go
+2
-1
No files found.
cli/parse.go
View file @
bcdf5a77
...
...
@@ -260,7 +260,8 @@ func appendStdinAsString(args []string, stdin *os.File) ([]string, *os.File, err
return
nil
,
nil
,
err
}
return
append
(
args
,
buf
.
String
()),
nil
,
nil
input
:=
strings
.
TrimSpace
(
buf
.
String
())
return
append
(
args
,
strings
.
Split
(
input
,
"
\n
"
)
...
),
nil
,
nil
}
func
appendFile
(
args
[]
cmds
.
File
,
inputs
[]
string
,
argDef
*
cmds
.
Argument
,
recursive
bool
)
([]
cmds
.
File
,
[]
string
,
error
)
{
...
...
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