You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: deduplicate VRF/host-interface checks in cmdCheck and cmdStatus
Extract the duplicated VRF existence and host-interface existence checks
shared between cmdCheck and cmdStatus into a single checkNodeLevelState
helper. Both operations previously ran the same vrf.Exists() +
netlink.LinkByName() sequence with identical error formatting, creating
a maintenance risk for future drift.
- Extract checkNodeLevelState helper that validates VRF and host interface
existence, returning the host interface name and accumulated errors
- Replace inline VRF/host checks in cmdCheck with a call to the helper
- Replace inline VRF/host checks in cmdStatus with a call to the helper
- Preserve hostName return value in cmdCheck for subsequent prevResult
validation without duplicating GenerateInterfaceNameHost
fixes#168
0 commit comments