aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Cholewiński <harry666t@gmail.com>2018-01-04 00:11:35 +0100
committerKamil Cholewiński <harry666t@gmail.com>2018-01-04 00:11:35 +0100
commit5bac082c48d647edabe12c8dbe6df276094c874b (patch)
treef057a2e392c07ba949e94bf0e5d70f1e8e5c1956
parente18cc0617ce0664c51c18a7dff425bf2ca29cbac (diff)
downloadjudo-5bac082c48d647edabe12c8dbe6df276094c874b.zip
judo-5bac082c48d647edabe12c8dbe6df276094c874b.tar.gz
judo-5bac082c48d647edabe12c8dbe6df276094c874b.tar.bz2
Making golint happy: Ssh -> SSH
-rw-r--r--host.go10
-rw-r--r--transport.go10
2 files changed, 10 insertions, 10 deletions
diff --git a/host.go b/host.go
index 1d1a95b..2dda640 100644
--- a/host.go
+++ b/host.go
@@ -40,8 +40,8 @@ func (host *Host) SendRemoteAndRun(job *Job) (err error) {
defer host.StopMaster()
// make cozy
- err = host.Ssh(job, "mkdir -p $HOME/.judo")
- tmpdir, err := host.SshRead(job, "TMPDIR=$HOME/.judo mktemp -d")
+ err = host.SSH(job, "mkdir -p $HOME/.judo")
+ tmpdir, err := host.SSHRead(job, "TMPDIR=$HOME/.judo mktemp -d")
if err != nil {
return err
}
@@ -49,7 +49,7 @@ func (host *Host) SendRemoteAndRun(job *Job) (err error) {
cleanup := func() error {
host.tmpdir = ""
- return host.Ssh(job, fmt.Sprintf("rm -r %s", tmpdir))
+ return host.SSH(job, fmt.Sprintf("rm -r %s", tmpdir))
}
// ensure cleanup
@@ -78,7 +78,7 @@ func (host *Host) SendRemoteAndRun(job *Job) (err error) {
}
// do the actual work
- errJob := host.Ssh(job, remoteCommand)
+ errJob := host.SSH(job, remoteCommand)
// clean up
if err = cleanup(); err != nil {
@@ -88,7 +88,7 @@ func (host *Host) SendRemoteAndRun(job *Job) (err error) {
}
func (host *Host) RunRemote(job *Job) (err error) {
- return host.Ssh(job, job.Command.cmd)
+ return host.SSH(job, job.Command.cmd)
}
func (host *Host) Cancel() {
diff --git a/transport.go b/transport.go
index 03dc984..35691e4 100644
--- a/transport.go
+++ b/transport.go
@@ -44,7 +44,7 @@ func shquote(s string) string {
return fmt.Sprintf(`'%s'`, s)
}
-func (host *Host) startSsh(job *Job, command string) (proc *Proc, err error) {
+func (host *Host) startSSH(job *Job, command string) (proc *Proc, err error) {
sshArgs := []string{host.Name}
sshArgs = append(sshArgs, []string{"cd", host.tmpdir, "&&"}...)
sshArgs = append(sshArgs, []string{"env"}...)
@@ -55,8 +55,8 @@ func (host *Host) startSsh(job *Job, command string) (proc *Proc, err error) {
return NewProc("ssh", sshArgs...)
}
-func (host *Host) Ssh(job *Job, command string) (err error) {
- proc, err := host.startSsh(job, command)
+func (host *Host) SSH(job *Job, command string) (err error) {
+ proc, err := host.startSSH(job, command)
close(proc.Stdin())
for {
select {
@@ -83,8 +83,8 @@ func (host *Host) Ssh(job *Job, command string) (err error) {
}
}
-func (host *Host) SshRead(job *Job, command string) (out string, err error) {
- proc, err := host.startSsh(job, command)
+func (host *Host) SSHRead(job *Job, command string) (out string, err error) {
+ proc, err := host.startSSH(job, command)
close(proc.Stdin())
for {
select {