Documentation ¶
Overview ¶
Package action provides implementations for every Glide command.
This is not a general-purpose library. It is the main flow controller for Glide.
The main glide package acts as a Facade, with this package providing the implementation. This package should know nothing of the command line flags or runtime characteristics. However, this package is allowed to control the flow of the application, including termination. So actions may call `msg.Die()` to immediately stop execution of the program.
In general, actions are not required to function as library functions, nor as concurrency-safe functions.
Index ¶
- func About()
- func Create(base string, skipImport bool)
- func Debug(on bool)
- func EnsureCacheDir()
- func EnsureConfig() *cfg.Config
- func EnsureGoVendor()
- func EnsureGopath() string
- func EnsureVendorDir()
- func Get(names []string, installer *repo.Installer, insecure, skipRecursive bool)
- func ImportGB(dest string)
- func ImportGPM(dest string)
- func ImportGodep(dest string)
- func Init(yaml, home string)
- func Install(installer *repo.Installer)
- func List(basedir string, deep bool)
- func LoadLockfile(base string, conf *cfg.Config) (*cfg.Lockfile, error)
- func Name()
- func NoColor(on bool)
- func NoVendor(path string, onlyGo, suffix bool)
- func Plugin(command string, args []string)
- func Quiet(on bool)
- func Rebuild()
- func Remove(packages []string, inst *repo.Installer)
- func Tree(basedir string, showcore bool)
- func Update(installer *repo.Installer, skipRecursive bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create creates/initializes a new Glide repository.
This will fail if a glide.yaml already exists.
By default, this will scan the present source code directory for dependencies.
If skipImport is set to true, this will not attempt to import from an existing GPM, Godep, or GB project if one should exist. However, it will still attempt to read the local source to determine required packages.
func EnsureCacheDir ¶
func EnsureCacheDir()
func EnsureConfig ¶
EnsureConfig loads and returns a config file.
Any error will cause an immediate exit, with an error printed to Stderr.
func EnsureGopath ¶
func EnsureGopath() string
EnsureGopath fails if GOPATH is not set, or if $GOPATH/src is missing.
Otherwise it returns the value of GOPATH.
func EnsureVendorDir ¶
func EnsureVendorDir()
EnsureVendorDir ensures that a vendor/ directory is present in the cwd.
func Get ¶
Get fetches one or more dependencies and installs.
This includes resolving dependency resolution and re-generating the lock file.
func ImportGB ¶
func ImportGB(dest string)
ImportGB imports GB dependencies into the present glide config.
func Init ¶
func Init(yaml, home string)
Init initializes the action subsystem for handling one or more subesequent actions.
func List ¶
List lists all of the dependencies of the current project.
Params:
- dir (string): basedir
- deep (bool): whether to do a deep scan or a shallow scan
func LoadLockfile ¶
LoadLockfile loads the contents of a glide.lock file.
TODO: This should go in another package.
func NoVendor ¶
NoVendor generates a list of source code directories, excepting `vendor/`.
If "onlyGo" is true, only folders that have Go code in them will be returned.
If suffix is true, this will append `/...` to every directory.
func Plugin ¶
Plugin attempts to find and execute a plugin based on a command.
Exit code 99 means the plugin was never executed. Code 1 means the program exited badly.
Types ¶
This section is empty.