Fetch and lists all the public topics associated with the specified GitHub topic.
(topic string)
| 18 | |
| 19 | // Fetch and lists all the public topics associated with the specified GitHub topic. |
| 20 | func 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 | |
| 30 | func main() { |
| 31 | var topic string |