Use bytes.NewReader instead of strings.NewReader in PostReview #11

Closed
opened 2026-05-01 19:23:38 +00:00 by rodin · 0 comments
Owner

Problem

PostReview does strings.NewReader(string(data)) which copies []bytestringio.Reader. Extra allocation.

Fix

Use bytes.NewReader(data) directly. Small optimization but correct.

## Problem `PostReview` does `strings.NewReader(string(data))` which copies `[]byte` → `string` → `io.Reader`. Extra allocation. ## Fix Use `bytes.NewReader(data)` directly. Small optimization but correct.
rodin closed this issue 2026-05-01 21:16:26 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rodin/review-bot#11