21 lines
361 B
Go
21 lines
361 B
Go
|
package annotation
|
||
|
|
||
|
// @Resource(name? string)
|
||
|
|
||
|
import (
|
||
|
"reflect"
|
||
|
|
||
|
oa "git.loafle.net/overflow/annotation-go"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
oa.Register(ResourceAnnotationType)
|
||
|
}
|
||
|
|
||
|
var ResourceAnnotationType = reflect.TypeOf((*ResourceAnnotation)(nil))
|
||
|
|
||
|
type ResourceAnnotation struct {
|
||
|
oa.Annotation `@name:"@Resource"`
|
||
|
Name string `json:"name" @default:""`
|
||
|
}
|