feat: split project name into owner and name
This commit is contained in:
parent
26ed84f50b
commit
45816ac7a8
2 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,10 @@
|
|||
package model
|
||||
|
||||
type GitHubAPI struct {
|
||||
Owner struct {
|
||||
Login string `json:"login"`
|
||||
} `json:"owner"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Stars int `json:"stargazers_count"`
|
||||
Language string `json:"language"`
|
||||
|
|
@ -8,6 +12,7 @@ type GitHubAPI struct {
|
|||
}
|
||||
|
||||
type GitHubData struct {
|
||||
Owner string `json:"owner"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Stars int `json:"stars"`
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ func GetGitHubData() []model.GitHubData {
|
|||
}
|
||||
|
||||
data = append(data, model.GitHubData{
|
||||
Name: project,
|
||||
Owner: apiResponse.Owner.Login,
|
||||
Name: apiResponse.Name,
|
||||
Description: apiResponse.Description,
|
||||
Stars: apiResponse.Stars,
|
||||
Language: apiResponse.Language,
|
||||
|
|
|
|||
Loading…
Reference in a new issue