docker/container.go
func (s *Container) HasExposedPorts() bool {
	nodes, err := s.NetworkNodes()
	if err != nil {
		return false
	}

	for _, v := range nodes {
		if v.Port > 0 || len(v.Protocol) > 0 {
			return true
		}
	}

	return false
}
func (s *Container) HasExposedPorts() bool {
	nodes, err := s.NetworkNodes()
	if err != nil {
		return false
	}

	for _, v := range nodes {
		if v.Port > 0 || len(v.Protocol) > 0 {
			return true
		}
	}

	return false
}
func ( s * Container ) HasExposedPorts ( ) bool { nodes , err := s . NetworkNodes ( ) if err != nil { return false } for _ , v := range nodes { if v . Port > 0 || len ( v . Protocol ) > 0 { return true } } return false }
// HasExposedPorts returns whether current container has exposed ports.
HasExposedPorts returns whether current container has exposed ports .