fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

rank: make go structs and aliases the same (#477)

Type aliases are super common in Go. From experimentally searching
around I often failed to find something since it was a type alias to a
map. EG when searching Header in the stdlib. So this change makes them
equivalent.

Test Plan: go test

+3 -3
+2 -2
build/e2e_test.go
··· 979 979 `), 980 980 query: &query.Substring{Content: true, Pattern: "aStruct"}, 981 981 wantLanguage: "Go", 982 - // 7000 (full base match) + 950 (Go interface) + 500 (word) + 400 (atom) + 10 (file order) 983 - wantScore: 8860, 982 + // 7000 (full base match) + 900 (Go interface) + 500 (word) + 400 (atom) + 10 (file order) 983 + wantScore: 8810, 984 984 }, 985 985 { 986 986 fileName: "src/net/http/client.go",
+1 -1
contentprovider.go
··· 718 718 case "interface": // interfaces 719 719 factor = 10 720 720 case "struct": // structs 721 - factor = 9.5 721 + factor = 9 722 722 case "talias": // type aliases 723 723 factor = 9 724 724 case "methodSpec": // interface method specification