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
minDistance:=1000// Set a high initial value for minimum distance
146
+
minDistanceName:=""
147
+
ifcm.MapServiceToPort(serviceName) ==0 {
148
+
services:=cm.Get().Shared.Services
149
+
150
+
forname:=rangeservices {
151
+
nameDistance:=ComputeDistance(serviceName, name)
152
+
ifnameDistance<=minDistance {
153
+
minDistance=nameDistance
154
+
minDistanceName=name
155
+
}
156
+
}
157
+
158
+
returnfmt.Errorf("service name %s is not mapped to any port, did you mean %s (port %d)?", serviceName, minDistanceName, cm.MapServiceToPort(minDistanceName))
0 commit comments