di/injection/annotation/inject.go

23 lines
312 B
Go
Raw Permalink Normal View History

2018-03-15 13:19:44 +00:00
package annotation
// @Inject(name? string)
import (
"reflect"
cda "git.loafle.net/commons_go/di/annotation"
)
const (
InjectTag = "@Inject"
)
func init() {
cda.RegisterAnnotation(InjectTag, reflect.TypeOf((*Inject)(nil)))
}
type Inject struct {
cda.Annotation
Name string `annotation-meta:"name"`
}