func gatewayServiceURLFromContext(ctx context.Context, ci *v1alpha1.ClusterIngress) string {
	cfg := config.FromContext(ctx).Istio
	if len(cfg.IngressGateways) > 0 && ci.IsPublic() {
		return cfg.IngressGateways[0].ServiceURL
	}
	if len(cfg.LocalGateways) > 0 && !ci.IsPublic() {
		return cfg.LocalGateways[0].ServiceURL
	}
	return ""
}
// gatewayServiceURLFromContext return an address of a load-balancer
// that the given ClusterIngress is exposed to, or empty string if
// none.
gatewayServiceURLFromContext return an address of a load-balancer
that the given ClusterIngress is exposed to, or empty string if
none.
// gatewayServiceURLFromContext return an address of a load - balancer // that the given ClusterIngress is exposed to or empty string if // none .
func gatewayServiceURLFromContext(ctx context.Context, ci *v1alpha1.ClusterIngress) string {
	cfg := config.FromContext(ctx).Istio
	if len(cfg.IngressGateways) > 0 && ci.IsPublic() {
		return cfg.IngressGateways[0].ServiceURL
	}
	if len(cfg.LocalGateways) > 0 && !ci.IsPublic() {
		return cfg.LocalGateways[0].ServiceURL
	}
	return ""
}
func gatewayServiceURLFromContext ( ctx context . Context , ci * v1alpha1 . ClusterIngress ) string { cfg := config . FromContext ( ctx ) . Istio if len ( cfg . IngressGateways ) > 0 && ci . IsPublic ( ) { return cfg . IngressGateways [ 0 ] . ServiceURL } if len ( cfg . LocalGateways ) > 0 && ! ci . IsPublic ( ) { return cfg . LocalGateways [ 0 ] . ServiceURL } return " " }
gatewayServiceURLFromContext return an address of a load-balancer
that the given ClusterIngress is exposed to, or empty string if
none.
gatewayServiceURLFromContext return an address of a load - balancer that the given ClusterIngress is exposed to or empty string if none .