github.com/microsoft/moc@v0.17.1/rpc/cloudagent/network/moc_cloudagent_networkinterface.go (about) 1 package network 2 3 func (m *NetworkInterface) GetPrimaryIpConfiguration() *IpConfiguration { 4 if m != nil { 5 for _, ipConfig := range m.IpConfigurations { 6 if ipConfig.Primary { 7 return ipConfig 8 } 9 } 10 } 11 return nil 12 }