v1.0.0
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package ssh
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func getConfigOrEmpty() string {
|
||||
homeDir, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
configPath := filepath.Join(homeDir, ".ssh", "config")
|
||||
file, err := os.Open(configPath)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
_ = file.Close()
|
||||
return configPath
|
||||
}
|
||||
Reference in New Issue
Block a user