Bug fixes and logging

This commit is contained in:
Ed
2018-12-16 23:02:46 -05:00
parent 74430d5d22
commit 130c7c1c06
3 changed files with 14 additions and 18 deletions

View File

@@ -79,6 +79,7 @@ func (g *gitlabClient) ListTags() ([]*gitlab.Tag, error) {
for {
tags, res, err := g.client.Tags.ListTags(g.repository, opt)
fmt.Printf("listing tags, page %d out of %d\n", opt.Page, res.TotalPages)
if err != nil {
return []*gitlab.Tag{}, err
}
@@ -112,6 +113,7 @@ func (g *gitlabClient) ListTagsUntil(tag_name string) ([]*gitlab.Tag, error) {
if err != nil {
return []*gitlab.Tag{}, err
}
fmt.Printf("listing tags until %s, page %d out of %d\n", tag_name, opt.Page, res.TotalPages)
if opt.Page >= res.TotalPages {
break
@@ -136,6 +138,7 @@ func (g *gitlabClient) GetTag(tag_name string) (*gitlab.Tag, error) {
if err != nil {
return &gitlab.Tag{}, err
}
fmt.Printf("getting tag %s", tag_name)
err = res.Body.Close()
if err != nil {