WithPassword sets the identity file option for the ssh executor
(pass string)
| 29 | |
| 30 | // WithPassword sets the identity file option for the ssh executor |
| 31 | func WithPassword(pass string) func(e *SSHExecutor) { |
| 32 | return func(e *SSHExecutor) { |
| 33 | e.Password = pass |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | // NewSSHExecutor creates a new executor |
| 38 | func NewSSHExecutor(host string, user string, opts ...func(e *SSHExecutor)) Executor { |