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 resource leak #68

Merged
merged 3 commits into from
Dec 15, 2023
Merged

fix resource leak #68

merged 3 commits into from
Dec 15, 2023

Conversation

gertd
Copy link
Member

@gertd gertd commented Dec 15, 2023

Change ds/generic.go:

  • func Marshal[T any, M Message[T]](t M) ([]byte, error)
  • func Unmarshal[T any, M Message[T]](b []byte) (M, error)

remove unnecessary conversion from []bytes -> bytes.Buffer (io.Reader) -> []bytes

importer.go

  • add missing ctx.Done exit
	select {
	case <-ctx.Done(): // exit if context is done
		return nil
	default:
	}

Copy link

github-actions bot commented Dec 15, 2023

Pull Request Test Coverage Report for Build 7219038549

  • 12 of 29 (41.38%) changed or added relevant lines in 2 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.07%) to 27.764%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/directory/v3/importer.go 2 19 10.53%
Files with Coverage Reduction New Missed Lines %
pkg/directory/v3/importer.go 5 5.0%
Totals Coverage Status
Change from base Build 7132817392: 0.07%
Covered Lines: 1012
Relevant Lines: 3645

💛 - Coveralls

@gertd gertd marked this pull request as ready for review December 15, 2023 19:00
@gertd gertd requested a review from ronenh December 15, 2023 19:00
@gertd gertd merged commit 38855ee into main Dec 15, 2023
2 checks passed
@gertd gertd deleted the fix/rob-close branch December 15, 2023 20:14
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.

None yet

2 participants