diff --git a/pkg/cmd/skills/publish/publish_test.go b/pkg/cmd/skills/publish/publish_test.go index 04f400733..97795a617 100644 --- a/pkg/cmd/skills/publish/publish_test.go +++ b/pkg/cmd/skills/publish/publish_test.go @@ -164,7 +164,7 @@ func TestPublishRun_UnsupportedHost(t *testing.T) { IO: ios, Dir: dir, GitClient: &git.Client{}, - HttpClient: func() (*http.Client, error) { return &http.Client{}, nil }, + HttpClient: func() (*http.Client, error) { return nil, nil }, host: "acme.ghes.com", }) require.ErrorContains(t, err, "supports only github.com") diff --git a/pkg/cmd/skills/search/search.go b/pkg/cmd/skills/search/search.go index 18471cc95..05511484e 100644 --- a/pkg/cmd/skills/search/search.go +++ b/pkg/cmd/skills/search/search.go @@ -770,17 +770,15 @@ func fetchPrimaryPages(client *api.Client, host, query string, displayPage, disp return allItems, totalCount, nil } -// skillResultKey is a typed map key for deduplicating code search results -// by (repo, namespace, skill name). All fields are lowercased for -// case-insensitive comparison. -type skillResultKey struct { - repo string - namespace string - skillName string -} - // deduplicateResults extracts unique (repo, namespace, skill name) triples from code search hits. func deduplicateResults(items []codeSearchItem) []skillResult { + // skillResultKey is a typed map key that deduplicates by (repo, namespace, + // skill name). All fields are lowercased for case-insensitive comparison. + type skillResultKey struct { + repo string + namespace string + skillName string + } seen := make(map[skillResultKey]struct{}) var results []skillResult