Documentation ¶
Index ¶
- func GoModDir() (string, error)
- func GoPath() string
- func InstallPackage(info *PackageInfo) error
- func MarkerPackagePath(pkg, version string) string
- func MarkerPackagePathFromPackageInfo(info *PackageInfo) string
- func MarkerPackageYamlPath(info *PackageInfo) string
- func MarkerProcessorYamlPath(info *PackageInfo) string
- type LoadResult
- type MarkerPackage
- type Package
- type PackageInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallPackage ¶
func InstallPackage(info *PackageInfo) error
func MarkerPackagePath ¶
func MarkerPackagePathFromPackageInfo ¶
func MarkerPackagePathFromPackageInfo(info *PackageInfo) string
func MarkerPackageYamlPath ¶
func MarkerPackageYamlPath(info *PackageInfo) string
func MarkerProcessorYamlPath ¶
func MarkerProcessorYamlPath(info *PackageInfo) string
Types ¶
type LoadResult ¶
type LoadResult struct {
// contains filtered or unexported fields
}
func LoadPackages ¶
func LoadPackages(patterns ...string) (*LoadResult, error)
LoadPackages loads and returns the Go packages by the given patterns.
func LoadPackagesWithConfig ¶
func LoadPackagesWithConfig(config *packages.Config, patterns ...string) (*LoadResult, error)
LoadPackagesWithConfig functions like LoadPackages. Except that it allows passing a custom config.
func (*LoadResult) GetPackages ¶
func (result *LoadResult) GetPackages() []*Package
type MarkerPackage ¶
type MarkerPackage struct { Path string `json:"Path"` Version string `json:"Version"` LatestVersion string `json:"LatestVersion"` DownloadedVersions []string `json:"DownloadedVersions"` AvailableVersions []string `json:"AvailableVersions"` Dir string `json:"Dir"` GoVersion string `json:"GoVersion"` }
func GetMarkerPackage ¶
func GetMarkerPackage(path string) (*MarkerPackage, error)
type Package ¶
func (*Package) IsStandardPackage ¶
type PackageInfo ¶
type PackageInfo struct { Path string `json:"Path"` Version string `json:"Version"` Versions []string `json:"Versions"` Time time.Time `json:"Time"` Dir string `json:"Dir"` GoMod string `json:"GoMod"` GoVersion string `json:"GoVersion"` }
func GetPackageInfo ¶
func GetPackageInfo(path string) (*PackageInfo, error)
func (*PackageInfo) ModulePath ¶
func (p *PackageInfo) ModulePath() string
func (*PackageInfo) Name ¶
func (p *PackageInfo) Name() string
Click to show internal directories.
Click to hide internal directories.