Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
haoqu.ma
/
gotty
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d56157f1
authored
Oct 13, 2015
by
Manfred Touron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using already-existing log command to print passed arguments
1 parent
788c9942
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
app/app.go
app/app.go
View file @
d56157f
...
...
@@ -317,7 +317,6 @@ func (app *App) handleWS(w http.ResponseWriter, r *http.Request) {
}
params
:=
query
.
Query
()[
"arg"
]
if
len
(
params
)
!=
0
{
log
.
Printf
(
"%s passed arguments are: %q"
,
r
.
RemoteAddr
,
strings
.
Join
(
params
,
" "
))
argv
=
append
(
argv
,
params
...
)
}
}
...
...
@@ -341,7 +340,7 @@ func (app *App) handleWS(w http.ResponseWriter, r *http.Request) {
log
.
Print
(
"Failed to execute command"
)
return
}
log
.
Printf
(
"Command is running for client %s with PID %d
"
,
r
.
RemoteAddr
,
cmd
.
Process
.
Pid
)
log
.
Printf
(
"Command is running for client %s with PID %d
(args=%q)"
,
r
.
RemoteAddr
,
cmd
.
Process
.
Pid
,
strings
.
Join
(
argv
,
" "
)
)
context
:=
&
clientContext
{
app
:
app
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment