FILE / ScuroNeko/est

internal/ssh/config.go

Исходный файл и его история в репозитории.
FILE bb2fa57bbeb0f317d4fdfd94520057bcdeeb37c7
Files
est/internal/ssh/config.go
T
ScuroNeko bb2fa57bbe
Golang lint / docker-smoke (push) Successful in 17s
Golang lint / lint (push) Failing after 18s
v1.0.0
2026-08-06 12:22:44 +03:00

21 lines
308 B
Go

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
}