style(recommendation): drop trailing comments that gofmt-1.23 wants aligned

CI's golangci-lint (`gofmt -s`) on Go 1.23 flagged inline comments after
the SessionVector literals in TestContextualMatchScore_TakesMax because
the variable-length values produced misaligned trailing columns. Local
gofmt on Go 1.26 was lenient. Replace with a leading comment that covers
all three rows; same intent, no alignment dance.
This commit is contained in:
2026-04-27 22:41:24 -04:00
parent 22622f3065
commit ad56eb279f
+4 -3
View File
@@ -131,10 +131,11 @@ func TestContextualMatchScore_AllLikesSeed_Returns0(t *testing.T) {
func TestContextualMatchScore_TakesMax(t *testing.T) {
// Three likes: full match, partial match, mismatch. Expect full match (1.0).
current := SessionVector{Artists: []string{"a1"}, Tags: map[string]int{"rock": 1}}
// Three likes covering 1.0 (full match), 0.7 (tags-only match), 0.0 (mismatch).
likes := []SessionVector{
{Artists: []string{"a1"}, Tags: map[string]int{"rock": 1}}, // 1.0
{Artists: []string{"a2"}, Tags: map[string]int{"rock": 1}}, // 0.7
{Artists: []string{"a99"}, Tags: map[string]int{"jazz": 1}}, // 0.0
{Artists: []string{"a1"}, Tags: map[string]int{"rock": 1}},
{Artists: []string{"a2"}, Tags: map[string]int{"rock": 1}},
{Artists: []string{"a99"}, Tags: map[string]int{"jazz": 1}},
}
got := ContextualMatchScore(current, likes, DefaultSimilarityWeights)
if !approxEq(got, 1.0) {