diff --git a/registry/registry.go b/registry/registry.go index acc6040..bbb86cb 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -25,7 +25,7 @@ type ComponentRegistry interface { GetInstance(t reflect.Type) (interface{}, error) GetInstances(ts []reflect.Type) ([]interface{}, error) GetInstanceByName(name string) (interface{}, error) - GetInstancesByAnnotationName(n string) ([]interface{}, error) + // GetInstancesByAnnotationName(n string) ([]interface{}, error) GetInstancesByAnnotationType(t reflect.Type) ([]interface{}, error) } @@ -215,27 +215,27 @@ func (cr *defaultComponentRegistry) GetInstances(ts []reflect.Type) ([]interface // GetInstancesByAnnotationName returns instance of annotated // n must be name of registered annotation -func GetInstancesByAnnotationName(n string) ([]interface{}, error) { - return registry.GetInstancesByAnnotationName(n) -} -func (cr *defaultComponentRegistry) GetInstancesByAnnotationName(n string) ([]interface{}, error) { - var ( - i interface{} - err error - ) - instances := make([]interface{}, 0) +// func GetInstancesByAnnotationName(n string) ([]interface{}, error) { +// return registry.GetInstancesByAnnotationName(n) +// } +// func (cr *defaultComponentRegistry) GetInstancesByAnnotationName(n string) ([]interface{}, error) { +// var ( +// i interface{} +// err error +// ) +// instances := make([]interface{}, 0) - for _, td := range cr.definitionByType { - if nil != td.GetAnnotation(n) { - if i, err = cr.GetInstance(td.Type); nil != err { - return nil, err - } - instances = append(instances, i) - } - } +// for _, td := range cr.definitionByType { +// if nil != td.GetAnnotation(n) { +// if i, err = cr.GetInstance(td.Type); nil != err { +// return nil, err +// } +// instances = append(instances, i) +// } +// } - return instances, nil -} +// return instances, nil +// } func GetInstancesByAnnotationType(t reflect.Type) ([]interface{}, error) { return registry.GetInstancesByAnnotationType(t)