This commit is contained in:
crusader 2018-08-22 19:15:12 +09:00
parent 9b562b23ea
commit e9205cada3

View File

@ -14,11 +14,6 @@ type Registry interface {
Get(f *reflect.StructField) (map[reflect.Type]Annotation, error) Get(f *reflect.StructField) (map[reflect.Type]Annotation, error)
} }
var SystemRegistry = &AnnotationRegistry{
parent: nil,
definitions: make(map[string]*Definition, 0),
}
func New(parent Registry) Registry { func New(parent Registry) Registry {
r := &AnnotationRegistry{ r := &AnnotationRegistry{
parent: parent, parent: parent,
@ -30,6 +25,11 @@ func New(parent Registry) Registry {
return r return r
} }
var SystemRegistry = &AnnotationRegistry{
parent: nil,
definitions: make(map[string]*Definition, 0),
}
type AnnotationRegistry struct { type AnnotationRegistry struct {
parent Registry parent Registry
definitions map[string]*Definition definitions map[string]*Definition