Files
fn_registry/functions/infra/ssh_config_add_entry.md
T
egutierrez 47fac22230 chore: auto-commit (799 archivos)
- .claude/CLAUDE.md
- .claude/commands/subagentes.md
- .claude/rules/INDEX.md
- .mcp.json
- bash/functions/cybersecurity/analyze_dns.md
- bash/functions/cybersecurity/audit_http_headers.md
- bash/functions/cybersecurity/audit_ssh_config.md
- bash/functions/cybersecurity/check_firewall.md
- bash/functions/cybersecurity/detect_suspicious_users.md
- bash/functions/cybersecurity/encrypt_file.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 00:28:20 +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_add_entry function go infra 1.0.0 pure func SSHConfigAddEntry(entries []SSHConfigEntry, entry SSHConfigEntry) ([]SSHConfigEntry, error) Añade un nuevo SSHConfigEntry a la lista. Error si el alias ya existe.
ssh
config
add
remote
pendiente-usar
ssh_config_entry_go_infra
false
fmt
name desc
entries lista actual de SSHConfigEntry
name desc
entry nuevo entry a añadir con alias unico
nueva lista con el entry añadido al final true
añade entry a lista vacia
añade entry a lista existente
error si alias duplicado
functions/infra/ssh_config_parse_test.go functions/infra/ssh_config_add_entry.go

Ejemplo

newEntry := SSHConfigEntry{Alias: "staging", HostName: "10.0.0.2", User: "deploy"}
updated, err := SSHConfigAddEntry(entries, newEntry)

Notas

No muta el slice original — crea una copia nueva. La validacion de unicidad es por alias exacto.