From 4907d9403e71d42e70a7aa1ff76b792ed2fba2f7 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Mon, 25 Dec 2023 14:14:02 +0700 Subject: ssh/config: add parameter Config to NewSection This changes how the Section and parser initialized. Previously, the Config depends on the parser to set the workDir and homeDir and Section depends on Config only on Get; now its the other way around, from top to bottom. Config initialized first, then parser initialized using Config instance, and then Section initialized also using Config instance. --- lib/ssh/client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ssh/client_test.go') diff --git a/lib/ssh/client_test.go b/lib/ssh/client_test.go index 062a32cc..feead9cc 100644 --- a/lib/ssh/client_test.go +++ b/lib/ssh/client_test.go @@ -20,7 +20,7 @@ func TestNewClient_KeyError_notExist(t *testing.T) { t.Skip(`Require active SSH server`) var ( - section = config.NewSection(`localhost`) + section = config.NewSection(nil, `localhost`) wd string err error -- cgit v1.3-6-g1900