---
name: parse_nordvpn_status
kind: function
lang: go
domain: infra
version: "1.0.0"
purity: pure
signature: "func ParseNordVPNStatus(output string) NordVPNStatus"
description: "Parsea la salida de texto de nordvpn status a un struct tipado. Elimina codigos ANSI y normaliza claves."
tags: [vpn, nordvpn, parser, pure, infra]
uses_functions: []
uses_types: ["NordVPNStatus_go_infra"]
returns: []
returns_optional: false
error_type: ""
imports: ["regexp", "strings"]
params:
  - name: output
    desc: "salida de texto de nordvpn status"
output: "struct NordVPNStatus con campos Connected, Hostname, IP, Country, City, Technology"
tested: true
tests: ["TestParseNordVPNStatus_Connected", "TestParseNordVPNStatus_Disconnected", "TestParseNordVPNStatus_WithANSI"]
test_file_path: "functions/infra/parse_nordvpn_status_test.go"
file_path: "functions/infra/parse_nordvpn_status.go"
---

## Ejemplo

```go
output := `Status: Connected
Hostname: es42.nordvpn.com
IP: 185.230.124.42
Country: Spain
City: Madrid
Current Technology: NordLynx`

s := ParseNordVPNStatus(output)
// s.Connected == true
// s.Hostname == "es42.nordvpn.com"
// s.Country == "Spain"
```

## Notas

Funcion pura — no ejecuta comandos ni accede a red. Maneja codigos ANSI que NordVPN CLI emite en terminal. Campos no presentes en la salida quedan como zero value.
