test: goroutine leak detector (#45)

- Add goroutine leak detector to help avoid Goroutine leaks by Uber:
https://github.com/uber-go/goleak
- By using this package, I found an issue in frecency:
- Close global DB connection to fix goroutine leak in tests
(https://github.com/versenilvis/IRIS/commit/831f86ffdf01124da537c149559fa41f37500e1e)
This commit is contained in:
VERSE
2026-07-28 10:18:19 +07:00
committed by GitHub
parent 84f2c8f49a
commit 5a05dc7553
14 changed files with 185 additions and 3 deletions
+2 -1
View File
@@ -8,8 +8,10 @@ require (
github.com/creack/pty v1.1.24
github.com/spf13/cobra v1.10.2
github.com/versenilvis/fuzzy v0.1.0-rc1.2
go.uber.org/goleak v1.3.0
golang.org/x/sys v0.44.0
golang.org/x/term v0.30.0
modernc.org/sqlite v1.53.0
)
require (
@@ -36,5 +38,4 @@ require (
modernc.org/libc v1.73.4 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect
modernc.org/sqlite v1.53.0 // indirect
)