Skip to content

V2#11

Merged
floatdrop merged 4 commits intomasterfrom
v2
Jun 16, 2025
Merged

V2#11
floatdrop merged 4 commits intomasterfrom
v2

Conversation

@floatdrop
Copy link
Owner

This version introduce Chan constructor, that will return debounced channel. On top of this
function we can now construct Debouncer with Close method, that perfectly aligns with go core concepts.

Some performance degradation is expected.

This version introduce Chan constructor, that will return debounced channel. On top of this
function we can now construct Debouncer with Close method, that perfectly aligns go.

- WithMaxWait is removed to reduce confusion, when configuring debounce. WithLimit will suffice for first release.

Closes #7
Closes #10
@github-actions
Copy link

📊 Coverage Report

Total Coverage: 94.3%

Coverage Details

github.com/floatdrop/debounce/debounce.go:26:	WithMaxCalls		100.0%
github.com/floatdrop/debounce/debounce.go:35:	WithMaxWait		100.0%
github.com/floatdrop/debounce/debounce.go:46:	New			85.7%
github.com/floatdrop/debounce/debounce.go:78:	NewFunc			100.0%
github.com/floatdrop/debounce/debounce.go:101:	callLimitReached	100.0%
github.com/floatdrop/debounce/debounce.go:105:	timeLimitReached	100.0%
github.com/floatdrop/debounce/debounce.go:109:	debouncedCall		100.0%
total:						(statements)		94.3%

1 similar comment
@github-actions
Copy link

📊 Coverage Report

Total Coverage: 94.3%

Coverage Details

github.com/floatdrop/debounce/debounce.go:26:	WithMaxCalls		100.0%
github.com/floatdrop/debounce/debounce.go:35:	WithMaxWait		100.0%
github.com/floatdrop/debounce/debounce.go:46:	New			85.7%
github.com/floatdrop/debounce/debounce.go:78:	NewFunc			100.0%
github.com/floatdrop/debounce/debounce.go:101:	callLimitReached	100.0%
github.com/floatdrop/debounce/debounce.go:105:	timeLimitReached	100.0%
github.com/floatdrop/debounce/debounce.go:109:	debouncedCall		100.0%
total:						(statements)		94.3%

@floatdrop floatdrop merged commit 517e1d7 into master Jun 16, 2025
7 checks passed
@floatdrop floatdrop deleted the v2 branch June 16, 2025 15: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.

MaxWait option is not affecting timer.Reset duration Add a way to stop debouncer

1 participant