Documentation ¶
Index ¶
- Constants
- func AddReplacesForGoMod(modFilePath, pkgModDir string, descs []ModuleCacheDesc) error
- func CopyDeps(pkgModDir string, descs []ModuleCacheDesc) error
- func CopyDir(src, dst string) error
- func CopyFile(src, dst string) (err error)
- func ParseModFile(filename string) (fi *modfile.File, err error)
- type ModuleCacheDesc
Constants ¶
View Source
const (
GoModFile = "go.mod"
)
Variables ¶
This section is empty.
Functions ¶
func AddReplacesForGoMod ¶
func AddReplacesForGoMod(modFilePath, pkgModDir string, descs []ModuleCacheDesc) error
AddReplacesForGoMod add necessary replaces for project go mod file
func CopyDeps ¶
func CopyDeps(pkgModDir string, descs []ModuleCacheDesc) error
CopyDeps copy dep module dirs to pkgModDir
Types ¶
type ModuleCacheDesc ¶
type ModuleCacheDesc struct { Path string // module path Version string // module version Error string // error loading module Info string // absolute path to cached .info file GoMod string // absolute path to cached .mod file Zip string // absolute path to cached .zip file Dir string // absolute path to cached source root directory Sum string // checksum for path, version (as in go.sum) GoModSum string // checksum for go.mod (as in go.sum) }
ModuleCacheDesc result of go mod download
func GenModuleDepDesc ¶
func GenModuleDepDesc(projectPath string) (descs []ModuleCacheDesc, err error)
GenModuleDepDesc return all module dependences for project
func SelectModuleDescs ¶
func SelectModuleDescs(descs []ModuleCacheDesc, pathPat *regexp.Regexp) []ModuleCacheDesc
SelectModuleDescs select matched modules
Click to show internal directories.
Click to hide internal directories.