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

refactor(metadata): avoid using sync.Once #498

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dakimura
Copy link
Contributor

@dakimura dakimura commented Sep 11, 2021

WHAT

stop using sync.Once in metadata.go and lock by itself.

WHY

Do() function in sync.Once struct doesn't allow to return value, which means the error in the function can't be handled.
It causes unexpected result of the initialization of metadata.

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2021

Codecov Report

Merging #498 (3e15ab1) into master (44aba3f) will increase coverage by 0.09%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master     #498      +/-   ##
==========================================
+ Coverage   47.75%   47.85%   +0.09%     
==========================================
  Files         122      122              
  Lines       12236    12261      +25     
==========================================
+ Hits         5843     5867      +24     
+ Misses       5905     5903       -2     
- Partials      488      491       +3     
Impacted Files Coverage Δ
utils/io/metadata.go 73.93% <83.13%> (+2.96%) ⬆️
catalog/catalog.go 64.97% <100.00%> (ø)

@dakimura dakimura marked this pull request as draft September 16, 2021 15:27
@sonarcloud
Copy link

sonarcloud bot commented Mar 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants