diff options
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/stanuki/main.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/cmd/stanuki/main.go b/cmd/stanuki/main.go index 332c1ad..18284d4 100644 --- a/cmd/stanuki/main.go +++ b/cmd/stanuki/main.go @@ -9,16 +9,9 @@ import ( "github.com/xlgmokha/x/pkg/env" "github.com/xlgmokha/x/pkg/serde" "github.com/xlgmokha/x/pkg/x" + "gitlab.com/mokhax/stanuki/pkg/gitlab" ) -type Issue struct { - ID int `json:"id"` - IID int `json:"iid"` - ProjectID int `json:"project_id"` - Title string `json:"title"` - Description string `json:"description"` -} - func main() { token := env.Fetch("GITLAB_TOKEN", "") url := "https://gitlab.com/api/v4/groups/9970/issues" @@ -29,7 +22,7 @@ func main() { if env.Fetch("DUMP", "") != "" { fmt.Println(string(x.Must(io.ReadAll(response.Body)))) } else { - issues := x.Must(serde.From[[]Issue](response.Body, serde.JSON)) + issues := x.Must(serde.From[[]gitlab.Issue](response.Body, serde.JSON)) for _, issue := range issues { fmt.Printf("%v: %v\n", issue.ID, issue.Title) } |
