Please, don't do that. Instead, get the nic's network's vlan tag and if > 0, do something like rawName := strings.TrimSuffix(ifaceName, fmt.Sprintf(".%d", vlanTag)). We don't support aliases yet, so no need to handle that case. And when we don't have a network (netName=""), just return interfacename without changes.