From fee20f0aeb51113a995c8fe21ff1e34f4244eb8f Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sat, 25 Feb 2023 19:36:18 +0700 Subject: 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. --- lib/ssh/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ssh') 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()) } -- cgit v1.3-6-g1900