func (repo *Repository) Print() {
	fmt.Println(repo.ToString())
}
Print data for Repository
package trending
import (
	"fmt"
	"net/http"
	"os"
	"regexp"
	"strconv"
	"strings"
	"github.com/PuerkitoBio/goquery"
)
type Span int
const (
	Today Span = iota
	Week
	Month
)
type Repository struct {
	Name        string
	URL         string
	Description string
	Lang        string
	Star        int
	StarBySpan  int
	Fork        int
}
func FindTrending(lang string, span Span) ([]Repository, error) {
	url := "https://github.com/trending/" + lang + "?" + "since=" + getQueryForSpan(span)
	resp, err := http.Get(url)
	if err != nil {
		print("Can not access to " + url)
		print(err)
		os.Exit(1)
	}
	doc, err := goquery.NewDocumentFromReader(resp.Body)
	if err != nil {
		return nil, err
	}
	repos := make([]Repository, 0, 25)
	doc.Find("article.Box-row").Each(func(i int, s *goquery.Selection) {
		repos = append(repos, getRepositoryBySelection(s))
	})
	return repos, nil
}
func FindLangs() []string {
	url := "https://github.com/trending"
	resp, err := http.Get(url)
	if err != nil {
		print("Can not access to " + url)
		print(err)
		os.Exit(1)
	}
	doc, err := goquery.NewDocumentFromReader(resp.Body)
	if err != nil {
		print("Can not get langs from " + url)
		print(err)
		os.Exit(1)
	}
	var langs []string
	doc.Find("details > details-menu > div.select-menu-list > div > a").Each(func(i int, s *goquery.Selection) {
		lang, _ := s.Attr("href")
		langURL := cleansing(lang)
		rep := regexp.MustCompile(`.*/(.*)\?since=daily`)
		query := rep.ReplaceAllString(langURL, "$1")
		langs = append(langs, query)
	})
	return langs
}
func getRepositoryBySelection(s *goquery.Selection) Repository {
	name := cleansing(s.Find("h1.lh-condensed").Text())
	url, _ := s.Find("h1.lh-condensed a").Attr("href")
	description := cleansing(s.Find("p").Text())
	lang := cleansing(s.Find("span[itemprop='programmingLanguage']").Text())
	star := cleansingNum(s.Find("div.f6.color-text-secondary.mt-2 > a:nth-child(2)").Text())
	fork := cleansingNum(s.Find("div.f6.color-text-secondary.mt-2 > a:nth-child(3)").Text())
	starBySpan := cleansingNum(
		strings.Replace(s.Find(".float-sm-right").Text(), "stars today", "", -1))
	return Repository{Name: name, URL: "https://github.com" + url,
		Description: description,
		Lang:        lang, Star: star,
		Fork:       fork,
		StarBySpan: starBySpan}
}
func cleansing(value string) string {
	return strings.Trim(strings.Replace(value, "\n", "", -1), " ")
}
func cleansingNum(value string) int {
	val, _ := strconv.Atoi(strings.Replace(cleansing(value), ",", "", -1))
	return val
}