Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: race condition and remove unused code #273

Merged
merged 8 commits into from
Dec 30, 2020
Merged

fix: race condition and remove unused code #273

merged 8 commits into from
Dec 30, 2020

Conversation

caarlos0
Copy link
Member

remove unused custom yaml parse and make some code a bit clearer...

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
@vercel
Copy link

vercel bot commented Dec 30, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/goreleaser/nfpm/1fniyypzm
✅ Preview: https://nfpm-git-ref.goreleaser.now.sh

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 30, 2020
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
@pull-request-size pull-request-size bot removed the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 30, 2020
@vercel vercel bot temporarily deployed to Preview December 30, 2020 12:50 Inactive
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 30, 2020
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
@vercel vercel bot temporarily deployed to Preview December 30, 2020 13:03 Inactive
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
@vercel vercel bot temporarily deployed to Preview December 30, 2020 18:29 Inactive
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
@pull-request-size pull-request-size bot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 30, 2020
@vercel vercel bot temporarily deployed to Preview December 30, 2020 18:35 Inactive
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 30, 2020
@caarlos0 caarlos0 changed the title refactor: small code improvements fix: race condition Dec 30, 2020
@caarlos0 caarlos0 changed the title fix: race condition fix: race condition and remove unused code Dec 30, 2020
func (c *Content) WithFileInfoDefaults() {
if c.FileInfo == nil {
c.FileInfo = &ContentFileInfo{}
func (c *Content) WithFileInfoDefaults() *Content {
Copy link
Member Author

Choose a reason for hiding this comment

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

this method could be called by multiple threads at once, therefore we probably need to modify and return a copy instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
@vercel vercel bot temporarily deployed to Preview December 30, 2020 18:51 Inactive
@caarlos0 caarlos0 added bug Something isn't working enhancement New feature or request labels Dec 30, 2020
Copy link
Contributor

@djgilcrease djgilcrease left a comment

Choose a reason for hiding this comment

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

LGTM

@vercel vercel bot temporarily deployed to Preview December 30, 2020 19:03 Inactive
@codecov
Copy link

codecov bot commented Dec 30, 2020

Codecov Report

Merging #273 (2e80c23) into master (b259c6c) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #273      +/-   ##
==========================================
+ Coverage   69.82%   69.86%   +0.03%     
==========================================
  Files           9        9              
  Lines        1097     1085      -12     
==========================================
- Hits          766      758       -8     
+ Misses        205      203       -2     
+ Partials      126      124       -2     
Impacted Files Coverage Δ
files/files.go 98.21% <100.00%> (+5.25%) ⬆️
nfpm.go 85.26% <100.00%> (+0.48%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b259c6c...2e80c23. Read the comment docs.

@kodiakhq kodiakhq bot merged commit 17af87e into master Dec 30, 2020
@kodiakhq kodiakhq bot deleted the ref branch December 30, 2020 19:15
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge bug Something isn't working enhancement New feature or request size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants