Skip to content

Commit 3def7b0

Browse files
joeybloggsjoeybloggs
authored andcommitted
Completed webhooks package documentation
1 parent 92184e3 commit 3def7b0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

webhooks.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@ func RunServer(s *http.Server, hook Webhook, path string) error {
6161
// RunTLSServer runs a custom server with TLS configuration.
6262
// NOTE: http.Server Handler will be overridden by this library, just set it to nil.
6363
// Setting the Certificates can be done in the http.Server.TLSConfig.Certificates
64-
// see example here:
64+
// see example here: https://github.com/joeybloggs/webhooks/blob/master/webhooks_test.go#L178
6565
func RunTLSServer(s *http.Server, hook Webhook, path string) error {
6666

67-
// var err error
68-
6967
srv := &server{
7068
hook: hook,
7169
path: path,
@@ -76,6 +74,7 @@ func RunTLSServer(s *http.Server, hook Webhook, path string) error {
7674
return s.ListenAndServeTLS("", "")
7775
}
7876

77+
// ServeHTTP is the Handler for every posted WebHook Event
7978
func (s *server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
8079
defer r.Body.Close()
8180

0 commit comments

Comments
 (0)