Skip to content

Commit

Permalink
refactor(clockify): do not return pointer slice when splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
gabor-boros committed Oct 13, 2021
1 parent b28faad commit 481eb3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/pkg/client/clockify/clockify.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (c *clockifyClient) getSearchURL(user string, params *WorklogSearchParams)
return fmt.Sprintf("%s?%s", worklogURL.Path, worklogURL.Query().Encode()), nil
}

func (c *clockifyClient) splitEntry(entry FetchEntry, bd time.Duration, ubd time.Duration) (*[]worklog.Entry, error) {
func (c *clockifyClient) splitEntry(entry FetchEntry, bd time.Duration, ubd time.Duration) ([]worklog.Entry, error) {
r, err := regexp.Compile(c.opts.TagsAsTasksRegex)
if err != nil {
return nil, err
Expand Down Expand Up @@ -143,7 +143,7 @@ func (c *clockifyClient) splitEntry(entry FetchEntry, bd time.Duration, ubd time
})
}

return &entries, nil
return entries, nil
}

func (c *clockifyClient) FetchEntries(ctx context.Context, opts *client.FetchOpts) ([]worklog.Entry, error) {
Expand Down Expand Up @@ -197,7 +197,7 @@ func (c *clockifyClient) FetchEntries(ctx context.Context, opts *client.FetchOpt
return nil, err
}

entries = append(entries, *pageEntries...)
entries = append(entries, pageEntries...)
} else {
entries = append(entries, worklog.Entry{
Client: worklog.IDNameField{
Expand Down

0 comments on commit 481eb3b

Please sign in to comment.