MCPcopy Create free account
hub / github.com/go-playground/webhooks / TestMain

Function TestMain

github/github_test.go:36–45  ·  view source on GitHub ↗
(m *testing.M)

Source from the content-addressed store, hash-verified

34var hook *Webhook
35
36func TestMain(m *testing.M) {
37 // setup
38 var err error
39 hook, err = New(Options.Secret("IsWishesWereHorsesWedAllBeEatingSteak!"))
40 if err != nil {
41 log.Fatal(err)
42 }
43 os.Exit(m.Run())
44 // teardown
45}
46
47func newServer(handler http.HandlerFunc) *httptest.Server {
48 mux := http.NewServeMux()

Callers

nothing calls this directly

Calls 2

NewFunction · 0.70
SecretMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…