Skip to content

Commit

Permalink
Move nil check to different line (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Jan 26, 2021
1 parent d29ddc3 commit cf15516
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wrappedclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ func (wc *WrappedClient) GetLatest(ctx context.Context, procOpt ProcessingOption

// constrain the pull to the recent timeframe
timeframe := Timeframe{Until: procOpt.Timeframe.Until}
if mostRecentTimestamp > 0 && timeframe.Until != nil {
if mostRecentTimestamp > 0 {
ts := time.Unix(mostRecentTimestamp, 0)
timeframe.Since = &ts
if timeframe.Until.Before(ts) {
if timeframe.Until != nil && timeframe.Until.Before(ts) {
// most recent item is already after "until"/end date; nothing to do
return nil
}
Expand Down

1 comment on commit cf15516

@mholt
Copy link
Owner Author

@mholt mholt commented on cf15516 Jan 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dangit, I meant #71 not 7.

Please sign in to comment.