mirror of
https://github.com/wavetermdev/ssh_config.git
synced 2026-08-05 13:43:40 -07:00
cleanup
This commit is contained in:
@@ -310,8 +310,7 @@ func (u *UserSettings) doLoadConfigs() {
|
||||
u.onceErr = err
|
||||
return
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
func parseFile(filename string, ignoreMatchDirective bool) (*Config, error) {
|
||||
|
||||
+3
-6
@@ -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 != "" {
|
||||
|
||||
+1
-2
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user