23 lines
312 B
Go
23 lines
312 B
Go
package annotation
|
|
|
|
// @Inject(name? string)
|
|
|
|
import (
|
|
"reflect"
|
|
|
|
cda "git.loafle.net/commons/di-go/annotation"
|
|
)
|
|
|
|
const (
|
|
InjectTag = "@Inject"
|
|
)
|
|
|
|
func init() {
|
|
cda.RegisterAnnotation(InjectTag, reflect.TypeOf((*Inject)(nil)))
|
|
}
|
|
|
|
type Inject struct {
|
|
cda.Annotation
|
|
Name string `annotation-meta:"name"`
|
|
}
|