Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
id
auth
Commits
6cde90b8
Commit
6cde90b8
authored
Jan 11, 2018
by
ale
Browse files
Small safety check
parent
c1632ea0
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/unixserver.go
View file @
6cde90b8
...
...
@@ -34,6 +34,9 @@ func (s *SocketServer) ServeLine(ctx context.Context, lw unix.LineResponseWriter
// on any protocol error.
parts
:=
bytes
.
SplitN
(
line
,
[]
byte
{
' '
},
2
)
nargs
:=
len
(
parts
)
if
nargs
<
1
{
return
errors
.
New
(
"no command given"
)
}
cmd
:=
string
(
parts
[
0
])
switch
{
case
nargs
==
1
&&
cmd
==
"quit"
:
...
...
Write
Preview
Supports
Markdown
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