GetArchive should return an io.ReadCloser #475
Labels
No Label
has/backport
has/pull
in progress
invalid
kind/breaking
kind/bug
kind/build
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/refactor
kind/security
kind/testing
kind/translation
kind/ui
need/backport
priority/critical
priority/low
priority/maybe
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/go-sdk#475
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
GetArchive
call appears to be designed with very small repositories in mind, since it returns the entire archive zip/tar.gz in the client's memory. For larger repositories this appears both infeasible (risking to blow up the client memory-wise) and very non-idiomatic (for Go code).The natural choice (IMHO) would have been to return an
io.ReadCloser
since I figure that the common thing is for the client to stream the archive to a file on disk (or similar) before processing it. Anyway, anio.ReadCloser
that reads the response body content would be endlessly more flexible.So instead of:
it would be nice to have something like:
If backwards-compatibility is a concern maybe introduce a new method:
petergardfjall referenced this issue2021-01-15 13:46:54 +00:00