Documentation
¶
Overview ¶
Package source includes detectors for STI source repositories
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultDetectors = Detectors{
DetectRuby,
DetectJava,
DetectNodeJS,
}
DefafultDetectors is a default set of Detector functions
Functions ¶
This section is empty.
Types ¶
type DetectorFunc ¶
type DetectorFunc func(dir string) (*Info, bool)
DetectorFunc is a function that returns source Info from a given directory. It returns true if it was able to detect the code in the given directory.
type Detectors ¶
type Detectors []DetectorFunc
Detectors is a set of DetectorFunc that is used to detect the language/platform for a given source directory
func (Detectors) DetectSource ¶
func (s Detectors) DetectSource(dir string) (*Info, bool)
DetectSource returns source information from a given directory using a set of Detectors
type Info ¶
type Info struct {
Platform string
Version string
}
Info is detected platform information from a source directory
func DetectJava ¶
func DetectJava(dir string) (*Info, bool)
DetectJava detects whether the source code in the given repository is Java
func DetectNodeJS ¶
func DetectNodeJS(dir string) (*Info, bool)
DetectNodeJS detects whether the source code in the given repository is NodeJS
func DetectRuby ¶
func DetectRuby(dir string) (*Info, bool)
DetectRuby detects whether the source code in the given repository is Ruby