MCPcopy Index your code
hub / github.com/bep/debounce

github.com/bep/debounce @v1.2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.1 ↗ · + Follow
8 symbols 21 edges 2 files 2 documented · 25% 77 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Go Debounce

Tests on Linux, MacOS and Windows 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
}

Core symbols most depended-on inside this repo

New
called by 5
debounce.go
add
called by 1
debounce.go

Shape

Function 6
Method 1
Struct 1

Languages

Go100%

Modules by API surface

debounce_test.go5 symbols
debounce.go3 symbols

For agents

$ claude mcp add debounce \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact