In Go every directory is a package. This works well when you have one repo containing all of your packages. When you have different packages in different VCS locations things become a bit more complicated. A project containing a collection of packages should be handled with the same information including the version. By grouping packages this way we are able to manage the related information.
These are works in progress, and may need some additional tuning. Please take a look at the vcs package. If you see a better way to handle it please let us know.
vendor/
into version control?That‘s up to you. It’s a personal or organizational decision. Glide will help you install the outside dependencies on demand or help you manage the dependencies as they are checked into your version control system.
By default, commands such as glide update
and glide install
install on-demand. To manage a vendor folder that's checked into version control use the flags:
--update-vendored
(aliased to -u
) to update the vendored dependencies.--strip-vcs
(aliased to -s
) to strip VCS metadata (e.g., .git
directories) from the vendor
folder.--strip-vendor
(aliased to -v
) to strip nested vendor/
directories.There are two parts to importing.
glide import
command. For example, you can run glide import godep
for Glide to detect the projects Godep configuration and generate a glide.yaml
file for you.Each of these will merge your existing glide.yaml
file with the dependencies it finds for those managers, and then emit the file as output. It will not overwrite your glide.yaml file.
You can write it to file like this:
$ glide import godep -f glide.yaml
Yes. Using the os
and arch
fields on a package
, you can specify which OSes and architectures the package should be fetched for. For example, the following package will only be fetched for 64-bit Darwin/OSX systems:
- package: some/package os: - darwin arch: - amd64
The package will not be fetched for other architectures or OSes.
Aside from being catchy, “glide” is a contraction of “Go Elide”. The idea is to compress the tasks that normally take us lots of time into a just a few seconds.