MCPcopy Index your code
hub / github.com/google/go-github / fetchTopics

Function fetchTopics

example/topics/main.go:20–28  ·  view source on GitHub ↗

Fetch and lists all the public topics associated with the specified GitHub topic.

(topic string)

Source from the content-addressed store, hash-verified

18
19// Fetch and lists all the public topics associated with the specified GitHub topic.
20func fetchTopics(topic string) (*github.TopicsSearchResult, error) {
21 client, err := github.NewClient()
22 if err != nil {
23 return nil, err
24 }
25
26 topics, _, err := client.Search.Topics(context.Background(), topic, nil)
27 return topics, err
28}
29
30func main() {
31 var topic string

Callers 1

mainFunction · 0.85

Calls 2

NewClientFunction · 0.92
TopicsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…