package
0.0.0-20201020153340-53909ea70814
Repository: https://github.com/gagliardetto/golang-go.git
Documentation: pkg.go.dev
# Functions
Allowed reports whether module m is allowed (not excluded) by the main module's go.mod.
AllowMissingModuleImports allows import paths to be resolved to modules when there is no module root.
AllowWriteGoMod undoes the effect of DisallowWriteGoMod: future calls to WriteGoMod will update go.mod if needed.
No description provided by the author
BuildList returns the module build list, typically constructed by a previous call to LoadBuildList or ImportPaths.
DirImportPath returns the effective import path for dir, provided it is within the main module, or else returns ".".
DisallowWriteGoMod causes future calls to WriteGoMod to do nothing at all.
Enabled reports whether modules are (or must be) enabled.
HasModRoot reports whether a main module is present.
Import finds the module and directory in the build list containing the package with the given import path.
ImportFromFiles adds modules to the build list as needed to satisfy the imports in the named Go source files.
ImportMap returns the actual package import path for an import path found in source code.
ImportPaths returns the set of packages matching the args (patterns), on the target platform.
ImportPathsQuiet is like ImportPaths but does not warn about patterns with no matches.
Init determines whether module mode is enabled, locates the root of the current module (if any), sets environment variables for Git subprocesses, and configures the cfg, codehost, load, modfetch, and search packages for use with modules.
InitMod sets Target and, if there is a main module, parses the initial build list from its go.mod file, creating and populating that file if needed.
No description provided by the author
LoadALL returns the set of all packages in the current module and their dependencies in any other modules, without filtering due to build tags, except "+build ignore".
LoadBuildList loads and returns the build list from go.mod.
LoadVendor is like LoadALL but only follows test dependencies for tests in the main module.
Lookup returns the source directory, import path, and any loading error for the package at path as imported from the package in parentDir.
MinReqs returns a Reqs with minimal additional dependencies of Target, as will be written to go.mod.
ModFile returns the parsed go.mod file.
ModFilePath returns the effective path of the go.mod file.
No description provided by the author
ModRoot returns the root of the main module.
ModuleHasRootPackage returns whether module m contains a package m.Path.
No description provided by the author
ModuleUsedDirectly reports whether the main module directly imports some package in the module with the given path.
PackageBuildInfo returns a string containing module version information for modules providing packages named by path and deps.
PackageDir returns the directory containing the source code for the package named by the import path.
PackageImports returns the imports for the package named by the import path.
PackageModule returns the module providing the package named by the import path.
PackageModuleInfo returns information about the module that provides a given package.
Query looks up a revision of a given module given a version query string.
QueryPackage looks up the module(s) containing path at a revision matching query.
QueryPattern looks up the module(s) containing at least one package matching the given pattern at the given version.
No description provided by the author
Replacement returns the replacement for mod, if any, from go.mod.
Reqs returns the current module requirement graph.
SetBuildList sets the module build list.
TargetPackages returns the list of packages in the target (top-level) module matching pattern, which may be relative to the working directory, under all build tag settings.
TidyBuildList trims the build list to the minimal requirements needed to retain the same versions of all packages from the preceding Load* or ImportPaths* call.
Why returns the "go mod why" output stanza for the given package, without the leading # comment.
WhyDepth returns the number of steps in the Why listing.
WillBeEnabled checks whether modules should be enabled but does not initialize modules by installing hooks.
WriteGoMod writes the current build list back to go.mod.
# Variables
running 'go mod init'.
module argument for 'go mod init'.
No description provided by the author
No description provided by the author
LoadTests controls whether the loaders load tests of the root packages.
No description provided by the author
# Structs
An AmbiguousImportError indicates an import of a package found in multiple modules in the build list, or found in both the main module and its vendor directory.
No description provided by the author
A NoMatchingVersionError indicates that Query found a module at the requested path, but not at any versions satisfying the query string and allow-function.
A PackageNotInModuleError indicates that QueryPattern found a candidate module at the requested version, but that module did not contain any packages matching the requested pattern.
No description provided by the author