fix(container): remove unnecessary nil check design

This commit is contained in:
John Guo
2026-01-22 20:39:19 +08:00
parent 096c0b2b05
commit 9b5ebbc3d7
32 changed files with 70 additions and 761 deletions

View File

@ -14,10 +14,8 @@ const (
)
var (
// checker checks whether the value is nil.
checker = func(v *Resource) bool { return v == nil }
// Instances map.
instances = gmap.NewKVMapWithChecker[string, *Resource](checker, true)
instances = gmap.NewKVMap[string, *Resource](true)
)
// Instance returns an instance of Resource.