update tool

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2016-12-28 11:02:31 +08:00
parent e3418f8441
commit 4fc0ebcd98
4 changed files with 136 additions and 16 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ import (
"golang.org/x/crypto/ssh/agent"
)
// Contains main authority information.
// MakeConfig Contains main authority information.
// User field should be a name of user on remote server (ex. john in ssh john@example.com).
// Server field should be a remote machine address (ex. example.com in ssh john@example.com)
// Key is a path to private key on your local machine.
@@ -107,7 +107,7 @@ func (ssh_conf *MakeConfig) Stream(command string) (output chan string, done cha
return outputChan, done, err
}
// Runs command on remote machine and returns its stdout as a string
// Run command on remote machine and returns its stdout as a string
func (ssh_conf *MakeConfig) Run(command string) (outStr string, err error) {
outChan, doneChan, err := ssh_conf.Stream(command)
if err != nil {