-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
To reduce the if complexity, please change to:
if !endpoint.EndpointID.Path == ei.Path || !endpoint.EndpointID.HTTPMethod == ei.HTTPMethod {
log.Info("some message") // if needed
continue
}
currentScore := calculateMatch(&endpoint, ei)
if _, exists := endpointsScoring[currentScore]; exists {
return nil, fmt.Errorf("can't match for request: %s, to many matches", GetID(&endpoint.EndpointID))
}
endpointsScoring[currentScore] = &endpoint
if currentScore > maxScore {
maxScore = currentScore
}
Originally posted by @sbp-bvanb in #81 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels