Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotated ¶
type Annotated interface {
Annotations() annotation.Annotations
Filter(preds ...AnnotationPredicate) annotation.Annotations
}
type AnnotationPredicate ¶
type AnnotationPredicate func(annotation.Annotation) bool
AnnotationPredicate is a function that tests whether an annotation matches a given condition.
func ByAnalyzer ¶
func ByAnalyzer(analyzerID string) AnnotationPredicate
ByAnalyzer returns a predicate that matches annotations produced by the given analyzer ID.
func ByName ¶
func ByName(name string) AnnotationPredicate
ByName returns a predicate that matches annotations with the given name.
func ByType ¶
func ByType(atype string) AnnotationPredicate
ByType returns a predicate that matches annotations with the given type.
type BaseAnnotated ¶
type BaseAnnotated struct {
// contains filtered or unexported fields
}
BaseAnnotated provides a default implementation of the Annotated interface.
func (*BaseAnnotated) AddAnnotations ¶
func (a *BaseAnnotated) AddAnnotations(annotations ...annotation.Annotation)
func (*BaseAnnotated) Annotations ¶
func (a *BaseAnnotated) Annotations() annotation.Annotations
func (*BaseAnnotated) Filter ¶
func (a *BaseAnnotated) Filter(preds ...AnnotationPredicate) annotation.Annotations
Filter returns all annotations matching every provided predicate. Predicates can be composed using the ByName, ByType, and ByAnalyzer helpers.
Click to show internal directories.
Click to hide internal directories.