Debian Codegraph @

/

debian golang-github-bep-debounce 1.2.0+really1.2.0-2debian golang-github-bep-debounce-dev gomod github.com/bep/debounce debiangoinimakefilemarkdownshellyaml 15 files · 102 symbols
View dependency graph

Depends on

README (full)

Go Debounce

Build Status GoDoc Go Report Card codecov Release

Example

func ExampleNew() {
	var counter uint64

	f := func() {
		atomic.AddUint64(&counter, 1)
	}

	debounced := debounce.New(100 * time.Millisecond)

	for i := 0; i < 3; i++ {
		for j := 0; j < 10; j++ {
			debounced(f)
		}

		time.Sleep(200 * time.Millisecond)
	}

	c := int(atomic.LoadUint64(&counter))

	fmt.Println("Counter is", c)
	// Output: Counter is 3
}
dir debian/
file .gitignore
file .travis.yml
file LICENSE
file README.md
file debounce.go
file debounce_test.go
file go.mod
file go.sum