diff options
| author | Shulhan <ms@kilabit.info> | 2023-02-25 19:36:18 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-02-25 19:56:24 +0700 |
| commit | fee20f0aeb51113a995c8fe21ff1e34f4244eb8f (patch) | |
| tree | 79e25493dde2931cefa5fbb812717355bcef8cce /lib/ssh | |
| parent | 4100f2dbd433ec885c3c9f5eb963ba98bb1ab1e4 (diff) | |
| download | pakakeh.go-fee20f0aeb51113a995c8fe21ff1e34f4244eb8f.tar.xz | |
all: access embedded field or methods using the type name
This is for clarity in the code, better to be explicit by typing where
the field or methods come from.
Diffstat (limited to 'lib/ssh')
| -rw-r--r-- | lib/ssh/client.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssh/client.go b/lib/ssh/client.go index 3063153c..ea624066 100644 --- a/lib/ssh/client.go +++ b/lib/ssh/client.go @@ -112,7 +112,7 @@ func NewClientFromConfig(cfg *config.Section) (cl *Client, err error) { // Execute a command on remote server. func (cl *Client) Execute(cmd string) (err error) { - sess, err := cl.NewSession() + sess, err := cl.Client.NewSession() if err != nil { return fmt.Errorf("ssh: NewSession: " + err.Error()) } |
