Skip to content

Switch existing CSV/binary download commands to os.Stdout.Write #55

Description

@yorkable

Background

PR #54 added syllable directory download using os.Stdout.Write(data) for byte-safe output. Two pre-existing download commands still use fmt.Print(string(data)), which round-trips bytes through a Go string and can corrupt non-UTF-8 content:

Today both endpoints return text (CSV / takeout file metadata), so the bug is latent. The takeouts file endpoint in particular could legitimately return binary (audio, archive) and would silently mangle it.

Suggested change

Replace fmt.Print(string(data)) with os.Stdout.Write(data) in both commands, matching the pattern in directoryDownloadCmd.

Why a follow-up issue and not part of #54

Out of scope for that PR (bulk-ops feature) per code-review discussion. Filing here so it doesn't get lost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions