aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Cholewiński <harry666t@gmail.com>2018-01-04 00:08:24 +0100
committerKamil Cholewiński <harry666t@gmail.com>2018-01-04 00:08:24 +0100
commit55e472bc3241f0dd6109a2fb785d9f3fb56cd7af (patch)
treef6683a0a24266a9753d1721e515d4353d0f07da7
parent38310a28178f5686d43270a4c029414b38010b01 (diff)
downloadjudo-55e472bc3241f0dd6109a2fb785d9f3fb56cd7af.zip
judo-55e472bc3241f0dd6109a2fb785d9f3fb56cd7af.tar.gz
judo-55e472bc3241f0dd6109a2fb785d9f3fb56cd7af.tar.bz2
Making golint happy: use camelCase
-rw-r--r--host.go10
-rw-r--r--transport.go18
2 files changed, 14 insertions, 14 deletions
diff --git a/host.go b/host.go
index 24b1c56..1d1a95b 100644
--- a/host.go
+++ b/host.go
@@ -66,11 +66,11 @@ func (host *Host) SendRemoteAndRun(job *Job) (err error) {
host.pushFiles(job, job.Script.fname, tmpdir)
// are we in dirmode?
- var remote_command string
+ var remoteCommand string
if !job.Script.dirmode {
- remote_command = path.Join(tmpdir, path.Base(job.Script.fname))
+ remoteCommand = path.Join(tmpdir, path.Base(job.Script.fname))
} else {
- remote_command = path.Join(
+ remoteCommand = path.Join(
tmpdir,
path.Base(job.Script.fname),
"script",
@@ -78,13 +78,13 @@ func (host *Host) SendRemoteAndRun(job *Job) (err error) {
}
// do the actual work
- err_job := host.Ssh(job, remote_command)
+ errJob := host.Ssh(job, remoteCommand)
// clean up
if err = cleanup(); err != nil {
return err
}
- return err_job
+ return errJob
}
func (host *Host) RunRemote(job *Job) (err error) {
diff --git a/transport.go b/transport.go
index e05c6a9..03dc984 100644
--- a/transport.go
+++ b/transport.go
@@ -7,9 +7,9 @@ import (
)
func (host *Host) pushFiles(job *Job,
- fname_local string, fname_remote string) (err error) {
- var remote = fmt.Sprintf("[%s]:%s", host.Name, fname_remote)
- proc, err := NewProc("scp", "-r", fname_local, remote)
+ fnameLocal string, fnameRemote string) (err error) {
+ var remote = fmt.Sprintf("[%s]:%s", host.Name, fnameRemote)
+ proc, err := NewProc("scp", "-r", fnameLocal, remote)
if err != nil {
return
}
@@ -45,14 +45,14 @@ func shquote(s string) string {
}
func (host *Host) startSsh(job *Job, command string) (proc *Proc, err error) {
- ssh_args := []string{host.Name}
- ssh_args = append(ssh_args, []string{"cd", host.tmpdir, "&&"}...)
- ssh_args = append(ssh_args, []string{"env"}...)
+ sshArgs := []string{host.Name}
+ sshArgs = append(sshArgs, []string{"cd", host.tmpdir, "&&"}...)
+ sshArgs = append(sshArgs, []string{"env"}...)
for key, value := range host.Env {
- ssh_args = append(ssh_args, fmt.Sprintf("%s=%s", key, value))
+ sshArgs = append(sshArgs, fmt.Sprintf("%s=%s", key, value))
}
- ssh_args = append(ssh_args, []string{"sh", "-c", shquote(command)}...)
- return NewProc("ssh", ssh_args...)
+ sshArgs = append(sshArgs, []string{"sh", "-c", shquote(command)}...)
+ return NewProc("ssh", sshArgs...)
}
func (host *Host) Ssh(job *Job, command string) (err error) {