<commit_before># An EventEmitter for Go

## Install

With `go get`:

    % go get github.com/CHH/eventemitter

## Usage

A new EventEmitter is created by the `NewEventEmitter` function.

```go
import ee "github.com/CHH/eventemitter"

func main() {
    emitter := ee.NewEventEmitter()
}
```

A listener is of type `func (event *ee.Event)`
Listeners can be bound to event names with the `On` method:

```go
emitter.On("foo", func(event *ee.Event) {
    fmt.Printf("Received event '%s'.", event.Name)
})
```

An event can be triggered by calling the `Emit` method:
<commit_msg>Added link to package docs.<commit_after># An EventEmitter for Go

## Install

With `go get`:

    % go get github.com/CHH/eventemitter

## Usage

_For more information please also see the [Package Docs](http://go.pkgdoc.org/github.com/CHH/eventemitter)._

A new EventEmitter is created by the `NewEventEmitter` function.

```go
import ee "github.com/CHH/eventemitter"

func main() {
    emitter := ee.NewEventEmitter()
}
```

A listener is of type `func (event *ee.Event)`
Listeners can be bound to event names with the `On` method:

```go
emitter.On("foo", func(event *ee.Event) {
    fmt.Printf("Received event '%s'.", event.Name)
})
```

An event can be triggered by calling the `Emit` method:

{'fraction_non_alphanumeric': 0.1360062893081761, 'fraction_numerical': 0.0, 'mean_word_length': 4.0717131474103585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5761989', 'n_tokens_mistral': 442, 'n_tokens_neox': 429, 'n_words': 147}