renamed function GetGitHubResponse

This commit is contained in:
Paul 2019-10-13 12:46:22 +02:00
parent 53f605dffc
commit 2f51c909ab

View File

@ -23,7 +23,7 @@ func GetReposFromGitHub(config *Config) ([]GitHubRepo, error) {
url := fmt.Sprintf("https://api.github.com/users/%s/starred?per_page=%d&page=%d", config.GitHubAuthUsername, config.GitHubMaxPerPage, num) url := fmt.Sprintf("https://api.github.com/users/%s/starred?per_page=%d&page=%d", config.GitHubAuthUsername, config.GitHubMaxPerPage, num)
fmt.Println(url) fmt.Println(url)
resp, err := GetGitHubRepos(config, url) resp, err := GetGitHubResponse(config, url)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -47,8 +47,8 @@ func GetReposFromGitHub(config *Config) ([]GitHubRepo, error) {
return repofulllist, nil return repofulllist, nil
} }
// GetGitHubRepos fetchs starred repositories on GitHub // GetGitHubResponse fetchs starred repositories on GitHub
func GetGitHubRepos(config *Config, url string) (*http.Response, error) { func GetGitHubResponse(config *Config, url string) (*http.Response, error) {
req, err := http.NewRequest("GET", url, nil) req, err := http.NewRequest("GET", url, nil)
if err != nil { if err != nil {
return nil, err return nil, err