Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoDendenciesFound is an error that will be returned after the finders have run ErrorNoDependenciesFound error = fmt.Errorf("no dependendies found") )
Functions ¶
This section is empty.
Types ¶
type Dependencies ¶
type Dependencies []Dependency
func (Dependencies) Languages ¶
func (d Dependencies) Languages() Dependencies
type Dependency ¶
type Dependency struct { // File where the dependency is defined. File string // Name of the dependency. Name string // Version of the dependency. Version string // License type of the dependency. License string // Kind of the dependency it could be language or library. Kind DependencyKind // Whether the dependency is direct or transitive. Direct bool // Language of the dependency Language DependencyLanguage }
Dependency found within a source code, this struct is used to capture the data And be able to transport it.
type DependencyKind ¶
type DependencyKind string
The kind of a dependency in a source code.
const ( // A library dependency. Most probably open source. DependencyKindLibrary DependencyKind = "library" // Language that the codebase depends on. DependencyKindLanguage DependencyKind = "language" // Tools like gofmt, yarn, npm, cargo etc. DependencyKindTool DependencyKind = "tool" )
type DependencyLanguage ¶ added in v0.1.7
type DependencyLanguage string
const ( // DependencyLanguageJs Represents the Javascript Language. DependencyLanguageJs DependencyLanguage = "Javascript" // DependencyLanguageJs Represents the Go Language. DependencyLanguageGo DependencyLanguage = "Go" )
type FinderFn ¶
type FinderFn func(wd string) (Dependencies, error)
A FinderFn is a function that can find dependencies for multiple means the main one would be looking within the passed working directory for specific files.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.