di-go/annotations/inject.go

22 lines
351 B
Go
Raw Normal View History

2019-11-13 13:34:36 +00:00
package annotations
// @Inject(name? string)
import (
"reflect"
"git.loafle.net/loafer/annotation-go"
)
var InjectAnnotationType = reflect.TypeOf((*InjectAnnotation)(nil))
func init() {
annotation.Register(InjectAnnotationType)
}
type InjectAnnotation struct {
annotation.TypeAnnotation `@annotation:"@Inject"`
Name string `json:"name"`
}