<commit_before># A Go based GitHub WebHook Listener

## Acknowledgments
<commit_msg>Updating README<commit_after># A Go based GitHub WebHook Listener

This is a simple package I created for my own purposes but I'm happy
to share it with other people.  At this point, I consider this
**alpha** code.  But my hope is to refine it into a solid chunk of
reusable code for easily creating Go based servers for handling
webhooks.  I have several applications in mind for this and I suspect
it will change significantly as I go.

## Example

The goal of this Go package is to allow users to easily create a
GitHub webhook server and attach handlers to it.  Different handlers
can, for example, be attached to different URLs by specifying
different paths.  In this example, a simple logging handler is
attached to `/log`:

```
package main

import "log"

import hs "github.com/xogeny/go-hooksink"

type Logger struct {}

func (l Logger) Push(msg hs.HubMessage) {
	log.Printf("PUSH: %v", msg);
}

func main() {
	h := hs.MakeHookSink();
	h.Add("/log", Logger{});
	h.Start();
o}
```

## Acknowledgments

When I went looking for existing Go language libraries for creating
servers to handle GitHub webhook calls, I came across
[dockerhub-webhook-listener](https://github.com/cpuguy83/dockerhub-webhook-listener)
by <NAME> (@cpuguy83).  I originally planned to reuse the code in
his repository (which was mostly generic, but a little bit Docker
specific) and refactor it into a more generic library.  But I realized
that once I started doing that there were so many things I wanted to
change that I felt like it would be better to start from scratch.

But this work was inspired considerably by his design and his approach
still supports several things that I currently don't (TLS, key
checking, etc).
{'fraction_non_alphanumeric': 0.06767337807606263, 'fraction_numerical': 0.0022371364653243847, 'mean_word_length': 4.421212121212121, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, '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': '3415502', 'n_tokens_mistral': 516, 'n_tokens_neox': 488, 'n_words': 266}