Files
fn_registry/functions/infra/ssh_config_read.md
T
egutierrez aca2348a20 chore: auto-commit (97 archivos)
- .claude/CLAUDE.md
- .claude/agents/fn-recopilador/SKILL.md
- .claude/rules/INDEX.md
- .claude/rules/cpp_apps.md
- bash/functions/infra/build_cpp_windows.sh
- cpp/CMakeLists.txt
- cpp/PATTERNS.md
- cpp/framework/app_base.cpp
- cpp/framework/app_base.h
- dev/issues/README.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 18:11:24 +02:00

1.1 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports params output tested tests test_file_path file_path
ssh_config_read function go infra 1.0.0 impure func SSHConfigRead() ([]SSHConfigEntry, error) Lee y parsea ~/.ssh/config. Retorna lista vacia si el archivo no existe.
ssh
config
read
remote
ssh_config_parse_go_infra
ssh_config_entry_go_infra
false error_go_core
fmt
os
path/filepath
lista de SSHConfigEntry parseados del archivo ~/.ssh/config true
TestSSHConfigRead_Missing
TestSSHConfigRead_ParsesExisting
TestSSHConfigRead_PermissionError
functions/infra/ssh_config_read_test.go functions/infra/ssh_config_read.go

Ejemplo

entries, err := SSHConfigRead()
if err != nil {
    log.Fatal(err)
}
for _, e := range entries {
    fmt.Printf("%s -> %s@%s\n", e.Alias, e.User, e.HostName)
}

Notas

Si ~/.ssh/config no existe, retorna lista vacia y nil (no es error — el usuario simplemente no tiene config aun). Usa SSHConfigParse internamente.