Skip to content

Commit

Permalink
Appease the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Apr 6, 2022
1 parent fa35996 commit 9b93967
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/telemetry/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ func (r *Reporter) report(_ context.Context, info info.Flipt, f file) error {
}

// reset the state file
f.Truncate(0)
f.Seek(0, 0)
if err := f.Truncate(0); err != nil {
return fmt.Errorf("truncating state file: %w", err)
}
if _, err := f.Seek(0, 0); err != nil {
return fmt.Errorf("resetting state file: %w", err)
}

var (
props = analytics.NewProperties()
Expand Down

0 comments on commit 9b93967

Please sign in to comment.