The glide.yaml
file contains information about the project and the dependent packages. Here the elements of the glide.yaml
file are outlined.
package: github.com/Masterminds/glide homepage: https://masterminds.github.io/glide license: MIT owners: - name: Matt Butcher email: technosophos@gmail.com homepage: http://technosophos.com - name: Matt Farina email: matt@mattfarina.com homepage: https://www.mattfarina.com ignore: - appengine import: - package: gopkg.in/yaml.v2 - package: github.com/Masterminds/vcs version: ^1.2.0 repo: git@github.com:Masterminds/vcs vcs: git - package: github.com/codegangsta/cli - package: github.com/Masterminds/semver version: ^1.0.0
These elements are:
package
: The top level package is the location in the GOPATH
. This is used for things such as making sure an import isn't also importing the top level package.homepage
: To find the place where you can find details about the package or applications. For example, http://k8s.ioowners
: The owners is a list of one or more owners for the project. This can be a person or organization and is useful for things like notifying the owners of a security issue without filing a public bug.ignore
: A list of packages for Glide to ignore importing. These are package names to ignore rather than directories.import
: A list of packages to import. Each package can include:package
: The name of the package to import and the only non-optional item. Package names follow the same patterns the go
tool does. That means:example.com/foo/pkg.git/subpkg
.version
: A semantic version, semantic version range, branch, tag, or commit id to use. For more information see the versioning documentation.repo
: If the package name isn't the repo location or this is a private repository it can go here. The package will be checked out from the repo and put where the package name specifies. This allows using forks.vcs
: A VCS to use such as git, hg, bzr, or svn. This is only needed when the type cannot be detected from the name. For example, a repo ending in .git or on GitHub can be detected to be Git. For a repo on Bitbucket we can contact the API to discover the type.os
: A list of operating systems used for filtering. If set it will compare the current runtime OS to the one specified and only fetch the dependency if there is a match. If not set filtering is skipped. The names are the same used in build flags and GOOS
environment variable.arch
: A list of architectures used for filtering. If set it will compare the current runtime architecture to the one specified and only fetch the dependency if there is a match. If not set filtering is skipped. The names are the same used in build flags and GOARCH
environment variable.devImport
: A list of development packages. Each package has the same details as those listed under import.