mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-22 08:18:29 +02:00
merge: main branch
This commit is contained in:
15
internal/utils/pool/pool_debug.go
Normal file
15
internal/utils/pool/pool_debug.go
Normal file
@@ -0,0 +1,15 @@
|
||||
//go:build debug
|
||||
|
||||
package pool
|
||||
|
||||
import (
|
||||
"runtime/debug"
|
||||
|
||||
"github.com/yusing/go-proxy/internal/logging"
|
||||
)
|
||||
|
||||
func (p Pool[T]) checkExists(key string) {
|
||||
if _, ok := p.m.Load(key); ok {
|
||||
logging.Warn().Msgf("%s: key %s already exists\nstacktrace: %s", p.name, key, string(debug.Stack()))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user