githubtrend

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2022 License: MIT Imports: 8 Imported by: 0

README

githubtrend

Crawl GitHub Trending to use something like daily chat bot

Usage

write the code like this.

package main

import (
	"fmt"

	"github.com/maito1201/githubtrend"
)

func main() {
	result, err := githubtrend.ScrapeGitHubTrend()
	if err != nil {
		panic(err)
	}
	for _, v := range result {
		fmt.Printf("%dStar %s\n", v.Star, v.Href)
	}
}
go run cmd/main.go
100Star https://github.com/example/example
99Star https://github.com/example/example2
...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScrapeResult

type ScrapeResult struct {
	Href string
	Star int
}

func ScrapeGitHubTrend

func ScrapeGitHubTrend() ([]ScrapeResult, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL