CodeQL library for Go
codeql/go-all 2.1.3 (changelog, source)
Search

Class Dependency

An abstract representation of a dependency.

Import path

import semmle.go.dependencies.Dependencies

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getAnImport

Gets an import of this dependency.

getDepPath

Gets the package path of this dependency.

getDepVersion

Gets the version of this dependency.

info

Holds if this dependency has package path path and version v.

relevantForFile

Holds if this dependency is relevant for imports in file file. That is, an import of this dependency’s path that is in file will use this dependency.

Inherited predicates

getFile

Gets the file this program element comes from.

from Locatable
getLocation

Gets this element’s location.

from Locatable
getNumLines

Gets the number of lines covered by this element.

from Locatable
hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

from Locatable
toString

Gets a textual representation of this element.

from Locatable