fix: address code review findings
This commit is contained in:
@@ -59,7 +59,10 @@ func Similarity(a, b string) float64 {
|
||||
}
|
||||
|
||||
// IsMatch reports whether a and b are similar enough to be considered the
|
||||
// same release, given the provided threshold in [0.0, 1.0].
|
||||
// same release, given the provided threshold in [0.0, 1.0]. A threshold of 0
|
||||
// (unset) falls back to DefaultThreshold, so this primitive honors the same
|
||||
// zero-means-default contract as FindMissingReleases/ScanArtist/ScanAll rather
|
||||
// than treating 0 as "always match".
|
||||
func IsMatch(a, b string, threshold float64) bool {
|
||||
return Similarity(a, b) >= threshold
|
||||
return Similarity(a, b) >= resolveThreshold(threshold)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user