From d5ad69131fd74429b220266bc75acca3b8adca28 Mon Sep 17 00:00:00 2001 From: fferro Date: Wed, 17 Jul 2024 10:56:24 +0100 Subject: [PATCH] cleanup --- config.go | 3 +-- config_test.go | 9 +++------ example_test.go | 3 +-- parser.go | 3 +-- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/config.go b/config.go index 885fffc..4828c80 100644 --- a/config.go +++ b/config.go @@ -310,8 +310,7 @@ func (u *UserSettings) doLoadConfigs() { u.onceErr = err return } - }, - ) + }) } func parseFile(filename string, ignoreMatchDirective bool) (*Config, error) { diff --git a/config_test.go b/config_test.go index c864be4..db8360b 100644 --- a/config_test.go +++ b/config_test.go @@ -460,8 +460,7 @@ func TestCustomFinder(t *testing.T) { us := &UserSettings{} us.ConfigFinder(func() string { return "testdata/config1" - }, - ) + }) val := us.Get("wap", "User") if val != "root" { @@ -475,8 +474,7 @@ func TestCustomFinderWhenIgnoringMatchDirective(t *testing.T) { } us.ConfigFinder(func() string { return "testdata/config1-with-match-directive" - }, - ) + }) val := us.Get("git.yahoo.com", "HostName") if val != "git.proxy.com" { @@ -488,8 +486,7 @@ func TestCustomFinderWhenNotIgnoringMatchDirective(t *testing.T) { us := &UserSettings{} us.ConfigFinder(func() string { return "testdata/config1-with-match-directive" - }, - ) + }) val := us.Get("git.yahoo.com", "HostName") if val != "" { diff --git a/example_test.go b/example_test.go index 020296c..771a287 100644 --- a/example_test.go +++ b/example_test.go @@ -53,7 +53,6 @@ func ExampleUserSettings_ConfigFinder() { u := ssh_config.UserSettings{} u.ConfigFinder(func() string { return filepath.Join("testdata", "test_config") - }, - ) + }) u.Get("example.com", "Host") } diff --git a/parser.go b/parser.go index e59c500..ed30810 100644 --- a/parser.go +++ b/parser.go @@ -176,8 +176,7 @@ func (p *sshParser) parseComment() sshParserStateFn { // account for the "#" as well leadingSpace: comment.Position.Col - 2, position: comment.Position, - }, - ) + }) return p.parseStart }