diff options
| author | mo khan <mo@mokhan.ca> | 2024-06-05 12:26:37 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2024-06-05 12:26:37 -0600 |
| commit | 620b3a0be81070872c8c990a1aecdc0e661dc90e (patch) | |
| tree | 9d735c06b54a48607fe28cfbf35b161a30647244 /cmd/stanuki | |
| parent | 5ee7e972f659afb951944873de024f88c1d1b149 (diff) | |
Start to define a storage interface for saving each issue
Diffstat (limited to 'cmd/stanuki')
| -rw-r--r-- | cmd/stanuki/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/stanuki/main.go b/cmd/stanuki/main.go index 9b4fca3..0588809 100644 --- a/cmd/stanuki/main.go +++ b/cmd/stanuki/main.go @@ -5,13 +5,15 @@ import ( "fmt" "github.com/xlgmokha/x/pkg/env" + "gitlab.com/mokhax/stanuki/pkg/db" "gitlab.com/mokhax/stanuki/pkg/gitlab" ) func main() { + issues := db.New[*gitlab.Issue]("./db/issues") gl := gitlab.New(context.TODO(), env.Fetch("GITLAB_TOKEN", "")) - gl.Group(9970).EachIssue(func(issue *gitlab.Issue) { fmt.Printf("%v: %v\n", issue.ID, issue.Title) + issues.Save(issue) }) } |
