From 7c120d5c49cb216f1aea3c37a3bb8fe78c6545da Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Tue, 23 May 2023 20:35:42 +0200 Subject: [PATCH] chore: adding goleak --- go.mod | 1 + go.sum | 2 ++ main_test.go | 11 +++++++++++ 3 files changed, 14 insertions(+) create mode 100644 main_test.go diff --git a/go.mod b/go.mod index 9a767c06..ff196ab3 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ go 1.18 require ( github.com/stretchr/testify v1.8.0 github.com/thoas/go-funk v0.9.1 + go.uber.org/goleak v1.2.1 golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 ) diff --git a/go.sum b/go.sum index cc231827..ffe90473 100644 --- a/go.sum +++ b/go.sum @@ -18,6 +18,8 @@ github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PK github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M= github.com/thoas/go-funk v0.9.1/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM= golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/main_test.go b/main_test.go new file mode 100644 index 00000000..911a9df0 --- /dev/null +++ b/main_test.go @@ -0,0 +1,11 @@ +package lo + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +}