Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(coderd): extract fileszip to its own package for reuse#15229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 4 commits intomainfromcj/extract-pkg-fileszip
Oct 25, 2024

Conversation

johnstcn
Copy link
Member

Related to#15087
As part of sniffing the workspace tags from an uploaded file, we need to be able to handle both zip and tar files. Extracting the functions in thefileszip package will be helpful here.

@johnstcnjohnstcn self-assigned thisOct 25, 2024
Comment on lines 22 to 28
funcTestTarFileBytes() []byte {
returnappend([]byte{},testTarFileBytes...)
}

funcTestZipFileBytes() []byte {
returnappend([]byte{},testZipFileBytes...)
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

review: returning a clone of the byte to avoid accidental mutation in tests

Comment on lines 16 to 20
//go:embed testdata/test.tar
vartestTarFileBytes []byte

//go:embed testdata/test.zip
vartestZipFileBytes []byte
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

review: I chose togo:embed these so that we don't end up with silly path errors.

Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Minor nits but otherwise LGTM.

@johnstcnjohnstcn merged commitdf34858 intomainOct 25, 2024
26 checks passed
@johnstcnjohnstcn deleted the cj/extract-pkg-fileszip branchOctober 25, 2024 14:14
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 25, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@mafredrimafredrimafredri approved these changes

@defelmnqdefelmnqAwaiting requested review from defelmnq

Assignees

@johnstcnjohnstcn

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@johnstcn@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp