mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-08 22:10:50 +00:00
Fix problems that golang inspection reported (#1158)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package dependency
|
||||
|
||||
var typeIntializerMap = make(map[DependencyContainerType]func() interface{}, 0)
|
||||
var typeInitializerMap = make(map[ContainerType]func() interface{}, 0)
|
||||
|
||||
func RegisterGenerator(name DependencyContainerType, fn func() interface{}) {
|
||||
typeIntializerMap[name] = fn
|
||||
func RegisterGenerator(name ContainerType, fn func() interface{}) {
|
||||
typeInitializerMap[name] = fn
|
||||
}
|
||||
|
||||
func GetInstance(name DependencyContainerType) interface{} {
|
||||
return typeIntializerMap[name]()
|
||||
func GetInstance(name ContainerType) interface{} {
|
||||
return typeInitializerMap[name]()
|
||||
}
|
||||
|
Reference in New Issue
Block a user