Documentation ¶
Index ¶
Constants ¶
View Source
const ( GoModFilename = "go.mod" GoSumFilename = "go.sum" )
Variables ¶
View Source
var ErrNotExist = errors.New("module does not exist")
Functions ¶
func IsProbablyModule ¶
Types ¶
type Collector ¶
type Collector struct { *GoClient // contains filtered or unexported fields }
func NewCollector ¶
func (*Collector) CollectGoModules ¶
func (*Collector) GetGoModule ¶
type GoClient ¶
type GoClient struct { Exec *hexec.Exec Dir string // Environment variables used in "go get" etc. Environ []string Logger loggers.Logger // contains filtered or unexported fields }
func (*GoClient) WrapModuleNotFound ¶
type GoModule ¶
type GoModule struct { Path string // module path Version string // module version Versions []string // available module versions (with -versions) Replace *GoModule // replaced by this module Time *time.Time // time version was created Update *GoModule // available update, if any (with -u) Main bool // is this the main module? Indirect bool // is this module only an indirect dependency of main module? Dir string // directory holding files for this module, if any GoMod string // path to go.mod file for this module, if any Error *goModuleError // error loading module }
type Import ¶
type Import struct { // Module path Path string // Ignore any config in config.toml (will still follow imports). IgnoreConfig bool // Do not follow any configured imports. IgnoreImports bool // Do not mount any folder in this import. NoMounts bool // Never vendor this import (only allowed in main project). NoVendor bool // Turn off this module. Disable bool // File mounts. Mounts []Mount // contains filtered or unexported fields }
type Module ¶
type Module struct { AbsDir string Fs afero.Fs Path string Parent *Module MountDirs []Mount // Go Module supported only *GoModule }
func (*Module) AppendMount ¶
func (*Module) ApplyMounts ¶
type Mount ¶
type Mount struct { // Relative path in source repo, e.g. "scss". SourcePath string // Relative target path, e.g. "assets/bootstrap/scss". TargetPath string // Any file in this mount will be associated with this language. Language string }
func (Mount) ComponentAndName ¶
type ProjectModule ¶
type ProjectModule struct {
*Module
}
Click to show internal directories.
Click to hide internal directories.