Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // AlwaysAngularFakeInspector is an inspector that always returns `true, nil` AlwaysAngularFakeInspector = &FakeInspector{ InspectFunc: func(p *plugins.Plugin) (bool, error) { return true, nil }, } // NeverAngularFakeInspector is an inspector that always returns `false, nil` NeverAngularFakeInspector = &FakeInspector{ InspectFunc: func(p *plugins.Plugin) (bool, error) { return false, nil }, } )
Functions ¶
This section is empty.
Types ¶
type FakeInspector ¶
type FakeInspector struct { // InspectFunc is the function called when calling Inspect() InspectFunc func(p *plugins.Plugin) (bool, error) }
FakeInspector is an inspector whose Inspect function can be set to any function.
type Inspector ¶
type Inspector interface { // Inspect open module.js and checks if the plugin is using Angular by matching against its source code. // It returns true if module.js matches against any of the detectors in angularDetectors. Inspect(p *plugins.Plugin) (bool, error) }
Inspector can inspect a module.js and determine if it's an Angular plugin or not.
func ProvideService ¶
func ProvideService() Inspector
type PatternsListInspector ¶
type PatternsListInspector struct {
// contains filtered or unexported fields
}
PatternsListInspector matches module.js against all the specified patterns, in sequence.
func NewDefaultPatternsListInspector ¶
func NewDefaultPatternsListInspector() *PatternsListInspector
NewDefaultPatternsListInspector returns a new *PatternsListInspector using defaultDetectors as detectors.
Click to show internal directories.
Click to hide internal directories.