Full Code of Masterminds/glide for AI

master b94b39d657d8 cached
217 files
1.1 MB
333.3k tokens
1739 symbols
1 requests
Download .txt
Showing preview only (1,199K chars total). Download the full file or copy to clipboard to get everything.
Repository: Masterminds/glide
Branch: master
Commit: b94b39d657d8
Files: 217
Total size: 1.1 MB

Directory structure:
gitextract_bnqaxfk6/

├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── LICENSE
├── Makefile
├── README.md
├── action/
│   ├── about.go
│   ├── about_test.go
│   ├── cache.go
│   ├── config_wizard.go
│   ├── create.go
│   ├── debug.go
│   ├── doc.go
│   ├── ensure.go
│   ├── get.go
│   ├── get_test.go
│   ├── import_gb.go
│   ├── import_godep.go
│   ├── import_gom.go
│   ├── import_gpm.go
│   ├── init.go
│   ├── install.go
│   ├── list.go
│   ├── list_test.go
│   ├── mirrors.go
│   ├── name.go
│   ├── name_test.go
│   ├── no_vendor.go
│   ├── no_vendor_test.go
│   ├── plugin.go
│   ├── plugin_test.go
│   ├── project_info.go
│   ├── rebuild.go
│   ├── rebuild_test.go
│   ├── remove.go
│   ├── tree.go
│   └── update.go
├── appveyor.yml
├── cache/
│   ├── cache.go
│   ├── cache_test.go
│   ├── global_lock.go
│   └── memory.go
├── cfg/
│   ├── cfg.go
│   ├── config.go
│   ├── config_test.go
│   ├── lock.go
│   └── lock_test.go
├── dependency/
│   ├── resolver.go
│   ├── resolver_test.go
│   └── scan.go
├── docs/
│   ├── commands.md
│   ├── example-glide.yaml
│   ├── faq.md
│   ├── getting-started.md
│   ├── glide-plugin-example
│   ├── glide.lock.md
│   ├── glide.yaml.md
│   ├── importing.md
│   ├── index.md
│   ├── plugins.md
│   ├── resolving-imports.md
│   ├── vendor.md
│   └── versions.md
├── gb/
│   ├── gb.go
│   └── manifest.go
├── glide.go
├── glide.yaml
├── glide_test.go
├── godep/
│   ├── godep.go
│   └── strip/
│       ├── strip.go
│       └── strip_test.go
├── gom/
│   ├── gom.go
│   └── parser.go
├── gpm/
│   └── gpm.go
├── importer/
│   └── importer.go
├── mirrors/
│   ├── cfg.go
│   ├── mirrors.go
│   └── mirrors_test.go
├── mkdocs.yml
├── msg/
│   ├── msg.go
│   ├── out.go
│   └── out_windows.go
├── path/
│   ├── path.go
│   ├── path_test.go
│   ├── strip.go
│   ├── strip_int_test.go
│   ├── strip_test.go
│   └── winbug.go
├── repo/
│   ├── installer.go
│   ├── repo.go
│   ├── semver.go
│   ├── set_reference.go
│   ├── tracker.go
│   ├── tracker_test.go
│   └── vcs.go
├── testdata/
│   ├── name/
│   │   ├── glide.yaml
│   │   └── glide2.yaml
│   ├── nv/
│   │   ├── a/
│   │   │   └── foo.empty
│   │   ├── b/
│   │   │   └── foo.empty
│   │   └── c/
│   │       └── foo.empty
│   ├── path/
│   │   ├── a/
│   │   │   ├── b/
│   │   │   │   └── c/
│   │   │   │       └── placeholder.empty
│   │   │   └── glide.yaml
│   │   └── x/
│   │       ├── glide.yaml
│   │       ├── symlinked_vendor/
│   │       │   └── placeholder.empty
│   │       └── y/
│   │           └── z/
│   │               └── placeholder.empty
│   ├── plugin/
│   │   ├── glide-hello
│   │   └── glide-hello-win.bat
│   └── rebuild/
│       └── glide.yaml
├── tree/
│   ├── tree.go
│   └── tree_test.go
├── util/
│   ├── normalizename_test.go
│   ├── util.go
│   └── util_test.go
└── vendor/
    ├── github.com/
    │   ├── Masterminds/
    │   │   ├── semver/
    │   │   │   ├── .travis.yml
    │   │   │   ├── CHANGELOG.md
    │   │   │   ├── LICENSE.txt
    │   │   │   ├── Makefile
    │   │   │   ├── README.md
    │   │   │   ├── appveyor.yml
    │   │   │   ├── benchmark_test.go
    │   │   │   ├── collection.go
    │   │   │   ├── collection_test.go
    │   │   │   ├── constraints.go
    │   │   │   ├── constraints_test.go
    │   │   │   ├── doc.go
    │   │   │   ├── version.go
    │   │   │   └── version_test.go
    │   │   └── vcs/
    │   │       ├── .gitignore
    │   │       ├── .travis.yml
    │   │       ├── CHANGELOG.md
    │   │       ├── LICENSE.txt
    │   │       ├── Makefile
    │   │       ├── README.md
    │   │       ├── appveyor.yml
    │   │       ├── bzr.go
    │   │       ├── bzr_test.go
    │   │       ├── errors.go
    │   │       ├── errors_test.go
    │   │       ├── git.go
    │   │       ├── git_test.go
    │   │       ├── glide.yaml
    │   │       ├── hg.go
    │   │       ├── hg_test.go
    │   │       ├── repo.go
    │   │       ├── repo_test.go
    │   │       ├── svn.go
    │   │       ├── svn_test.go
    │   │       ├── vcs_local_lookup.go
    │   │       ├── vcs_remote_lookup.go
    │   │       └── vcs_remote_lookup_test.go
    │   ├── codegangsta/
    │   │   └── cli/
    │   │       ├── .flake8
    │   │       ├── .gitignore
    │   │       ├── .travis.yml
    │   │       ├── CHANGELOG.md
    │   │       ├── LICENSE
    │   │       ├── README.md
    │   │       ├── altsrc/
    │   │       │   ├── altsrc.go
    │   │       │   ├── flag.go
    │   │       │   ├── flag_generated.go
    │   │       │   ├── flag_test.go
    │   │       │   ├── helpers_test.go
    │   │       │   ├── input_source_context.go
    │   │       │   ├── map_input_source.go
    │   │       │   ├── toml_command_test.go
    │   │       │   ├── toml_file_loader.go
    │   │       │   ├── yaml_command_test.go
    │   │       │   └── yaml_file_loader.go
    │   │       ├── app.go
    │   │       ├── app_test.go
    │   │       ├── appveyor.yml
    │   │       ├── autocomplete/
    │   │       │   ├── bash_autocomplete
    │   │       │   └── zsh_autocomplete
    │   │       ├── category.go
    │   │       ├── cli.go
    │   │       ├── command.go
    │   │       ├── command_test.go
    │   │       ├── context.go
    │   │       ├── context_test.go
    │   │       ├── errors.go
    │   │       ├── errors_test.go
    │   │       ├── flag-types.json
    │   │       ├── flag.go
    │   │       ├── flag_generated.go
    │   │       ├── flag_test.go
    │   │       ├── funcs.go
    │   │       ├── generate-flag-types
    │   │       ├── help.go
    │   │       ├── help_test.go
    │   │       ├── helpers_test.go
    │   │       ├── helpers_unix_test.go
    │   │       ├── helpers_windows_test.go
    │   │       └── runtests
    │   └── mitchellh/
    │       └── go-homedir/
    │           ├── LICENSE
    │           ├── README.md
    │           ├── homedir.go
    │           └── homedir_test.go
    └── gopkg.in/
        └── yaml.v2/
            ├── .travis.yml
            ├── LICENSE
            ├── LICENSE.libyaml
            ├── README.md
            ├── apic.go
            ├── decode.go
            ├── decode_test.go
            ├── emitterc.go
            ├── encode.go
            ├── encode_test.go
            ├── example_embedded_test.go
            ├── parserc.go
            ├── readerc.go
            ├── resolve.go
            ├── scannerc.go
            ├── sorter.go
            ├── suite_test.go
            ├── writerc.go
            ├── yaml.go
            ├── yamlh.go
            └── yamlprivateh.go

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
glide
glide.exe
*.a
*.sublime-project
*.sublime-workspace
dist/
.DS_Store
.idea


================================================
FILE: .travis.yml
================================================
language: go

go:
  - 1.7.x
  - 1.8.x
  - 1.9.x
  - 1.10.x
  - 1.11.x
  - 1.12.x
  - tip

# Setting sudo access to false will let Travis CI use containers rather than
# VMs to run the tests. For more details see:
# - http://docs.travis-ci.com/user/workers/container-based-infrastructure/
# - http://docs.travis-ci.com/user/workers/standard-infrastructure/
sudo: false

# The default script is go test -v ./... which will test everything
# in the vendor directory. We don't need to test all dependent packages.
# Only testing this project.
script:
  - make test integration-test verify-version

notifications:
  webhooks:
    urls:
      - https://webhooks.gitter.im/e/67e4b42cbf763625d0b4
    on_success: change
    on_failure: always
    on_start: never


================================================
FILE: CHANGELOG.md
================================================
# Release 0.13.4 (unreleased)

# Release 0.13.3 (2019-07-12)

## Fixed

- #1056: Fixed issue where Glide is not detecting crypto/ed25519, now in the stdlib (thanks @martinkunc)
- #1033: Fixed segfault with Glide 0.13.2 when stripping Godep workspace (thanks @databus23)

# Release 0.13.2 (2018-09-26)

## Fixed

- #956: Fixed Error handling nested vendor folders (thanks @apynes2)
- #953: Fixed issue where error was not propagating

# Release 0.13.1 (2017-11-07)

## Fixed

- #935: Fix handling of new core package math/bits (thanks @prateek)

# Release 0.13.0 (2017-09-28)

## Added

- #631: Verify version during build in automation (thanks @breerly)
- #711: Added a commit hash example to the docs (thanks @mh-cbon)
- #771: Handling default GOPATH for Go 1.8
- #814: Adding install instructions for Ubuntu 17.04 (thanks @HaraldNordgren)
- #870: Added support for s390x architecture (thanks @Nayana-ibm)

## Changed

- #582: Removed verbose flag as it was not being used (thanks @kelcecil)
- #697: Preserve vendor/.git, if it exists. (thanks @sdboyer)
- #686: Make ending dots in output more consistent (thanks @stevenroose)
- #748: Updated tests to work windows and add windows CI testing
- #717: Cache GOROOT at init time for performance (thanks @heyitsanthony)
- #797, #821, #908: Updating to the latest version of the dependencies
- #800: Allow VERSION of glide to be passed in with build script (thanks @BlackYoup)
- #774: Add docs on using go get to install glide (thanks @philoserf)
- #907: Updated Travis CI language versions of Go to test against (thanks @dvrkps)
- #916: Update gox to version managed by Masterminds for builds

## Fixed

- #736: Find home dir without using cgo (thanks @krancour)
- #603: Fixed where, in some cases not importing dependencies config
- #620: Fixed grammar usage on projects (thanks @server-monitor)
- #623: Fixed typos in help and  (thanks @jonboulle)
- #628: Fixed typos (thanks @philoserf)
- #733: Fixed documentation issues (thanks @matiasanaya)
- #747: Fixed issue with glide home directory (thanks @agatan)
- #759: More spelling fixes (thanks @jbirch)
- #775: Even more doc typo fixes (thanks @cristiangreco)
- #811: Fixed issue with windows git submodules
- #819: Fixed more typos (thanks @zoofood)
- #829: Fixed preservation of .git files correctly (@RaduBerinde)
- #778: Fixed removing and moving large sets of files fails on Windows
- #910: Fixed issue due to go/build.ImportDir change response on not found dir
- #906: Fixed CustomRemoveAll() to handle spaces in paths, and also file not found (thanks @jpz)

# Release 0.12.3 (2016-10-03)

## Fixed
- #615: Fixed possible situation where resolver could get stuck in a loop

# Release 0.12.2 (2016-09-13)

## Fixed
- #599: In some cases was not importing dependencies config
- #601: Fixed issue where --all-dependencies flag stopped working

# Release 0.12.1 (2016-08-31)

## Fixed
- #578: Not resolving parent project packages in some cases
- #580: cross-device error handling failed on Windows in some cases
- #590: When exit signal received remove global lock

Note, Plan 9 is an experimental OS for Go. Due to some issues we are not going
to be supporting builds for it at this time.

# Release 0.12.0 (2016-08-23)

## Added
- Support for distributions in FreeBSD, OpenBSD, NetBSD, and Plan9
- #528: ARM release support (thanks @franciscocpg)
- #563: Added initial integration testing
- #533: Log VCS output with debug (`--debug` switch) when there was a VCS error (thanks @atombender)
- #39: Added support for mirrors. See the mirror command and subcommands

## Changed
- #521: Sort subpackages for glide.yaml and glide.lock to avoid spurious diffs
- #487: Skip lookup of subpackage location when parent repo is already known
  This skips unnecessary network requests (thanks @hori-ryota)
- #492 and #547: Dependencies are now resolved in a global cache and exported to
  vendor/ directories. This allows sharing of VCS data between projects without
  upseting the GOPATH versions and is faster for projects vendoring dependencies.
  Some flags including --update-vendored, --cache-gopath, --use-gopath, and some
  others are deprecated and no longer needed.

## Fixed
- #287: When file or directory not found provide useful message
- #559: Fixed error is nil issue (thanks @mfycheng)
- #553: Export was failing with different physical devices
- #542: Glide failed to detect some test dependencies (thanks @sdboyer)
- #517: Fixed failure to install testImport from lock when no imports present
  or when same dependency on both import and testImport
- #440: Fixed panic in `glide tree` when walking the filesystem (thanks @abhin4v)
- #529: --delete flag deleted and re-downloaded transitive dependencies
- #535: Resolve vendor directory symlinks (thanks @Fugiman)

# Release 0.11.1 (2016-07-21)

## Fixed
- #505: Ignored dependency showing up in testImport

# Release 0.11.0 (2016-07-05)

## Added
- #461: Resolve test imports
- #458: Wizard and version detection are now on `glide get`
- #444: New config wizard helps you find versions and set ranges. Can be run from
  `glide init` or as separate command
- #438: Added ability to read symlink basedirs (thanks @klnusbaum)
- #436: Added .idea to .gitignore
- #393 and #401: Added a PPA (https://github.com/Masterminds/glide-ppa) and instructions
  on using it (thanks @franciscocpg)
- #390: Added support for custom Go executable name. Needed for environments like
  appengine. Environment variable GLIDE_GO_EXECUTABLE (thanks @dpmcnevin)
- #382: `glide info` command takes a format string and returns info (thanks @franciscocpg)
- #365: glide list: support json output format (thanks @chancez)

## Changed
- Tags are now in the form v[SemVer]. The change is the initial v on the tag.
  This is to conform with other Go tools that require this.
- #501: Updating the plugins documentation and adding listing
- #500: Log an error if stripping version control data fails (thanks @alexbrand)
- #496: Updated to github.com/Masterminds/semver 1.1.1
- #495: Updated to github.com/Masterminds/vcs 1.8.0
- #494: Glide install skips fetch when it is up to date
- #489: Make shared funcs for lockfile usage (thanks @heewa)
- #459: When a conflict occurs output the tag, if one exists, for the commit
- #443: Updating message indentation to be uniform
- #431: Updated the docs on subpackages
- #433: The global shared cache was reworked in prep for future uses
- #396: Don't update the lock file if nothing has changed

## Fixed
- #460: Sometimes ignored packages were written to lock file. Fixed.
- #463: Fixed possible nil pointer issues
- #453: Fix DeleteUnused flag which was not working (thanks @s-urbaniak)
- #432: Fixed issue with new net/http/httptrace std lib package
- #392: Correctly normalize Windows package paths (thanks @jrick)
- #395: Creating the cache key did not handle SCP properly
- #386: Fixed help text indentation
- #383: Failed `glide get` had been updating files. No longer does this

And thanks to @derelk, @franciscocpg, @shawnps, @kngu9, @tugberkugurlu, @rhcarvalho,
@gyuho, and @7imon7ays for documentation updates.

# Release 0.10.2 (2016-04-06)

- Issue #362: Updated docs on how -update-vendored works to help avoid confusion.
- Fixed #371: Warn when name/location mismatch.
- Fixed #290: On windows Glide was sometimes pulls in current project (thanks tzneal).
- Fixed #361: Handle relative imports (thanks tmm1).
- Fixed #373: Go 1.7 context package import issues.

# Release 0.10.1 (2016-03-25)

- Fixed #354: Fixed a situation where a dependency could be fetched when
  set to ignore.

# Release 0.10.0 (2016-03-24)

- Issue #293: Added support for importing from Gomfile's (thanks mcuelenaere).
- Issue #318: Opt-In to strip VCS metadata from vendor directory.
- Issue #297: Adds exclude property for directories in local codebase to exclude
  from scanning.
- Issue #301: Detect version control type from scp style paths (e.g. git@) and
  from scheme types (e.g., git://).
- Issue #339: Add ability to remove nested vendor and Godeps workspaces
  directories. Note, if Godeps rewriting occured it is undone. The Godeps handling
  is deprecated from day one and will be removed when most Godeps projects have
  migrated to vendor folder handling.
- Issue #350: More detailed conflict information (commit metadata displayed).
- Issue #351: Move to Gitter for chat.
- Issue #352: Make Glide installable. The dependencies are checked into the
  `vendor` folder.

# Release 0.9.3 (2016-03-09)

- Fixed #324: Glide tries to update ignored package

# Release 0.9.2 (2016-03-08)

- Fixed issue on #317: Some windows calls had the improper path separator.
- Issue #315: Track updated packages to avoid duplicated work (in part by
  thockin, thanks).
- Fixed #312: Don't double-print SetVersion() failure (thanks thockin).
- Fixed #311: Don't process deps if 'get' was a non-operation (thanks thockin).
- Issue #307: Moving 'already set' to a debug message to cleanup output
  (thanks thockin).
- Fixed #306: Don't call SetVersion twice. There was a place where it was called
  twice in a logical row (thanks thockin).
- Fixed #304: Glide tries to update ignored packages.
- Fixed #302: Force update can cause a panic.

# Release 0.9.1 (2016-02-24)

- Fixed #272: Handling appengine special package case.
- Fixed #273: Handle multiple packages in the same directory but handling
  build tags used in those packages.
- Added documentation explaining how import resolution works.
- Fixed #275 and #285: Empty directories as package locations reporting errors.
  Improved the UX and handle the errors.
- Fixed #279: Added Go 1.7 support that no longer has GO15VENDOREXPERIMENT.
- Issue #267: Added `os` and `arch` import properties to the documentation.
- Fixed #267: Glide was only walking the import tree based on build flags for
  the current OS and Arch. This is a problem for systems like docker that have
  variation built in.

# Release 0.9.0 (2016-02-17)

- Fixed #262: Using correct query string merging for go-get queries (thanks gdm85).
- Fixed #251: Fixed warning message (thanks james-lawrence).
- Adding support for IBM JazzHub.
- Fixes #250: When unable to retrieve or set version on a dependency now erroring
  and exiting with non-0 exit code.
- Issue #218: Added `glide rm` command.
- Fixed #215: Under some error conditions the package resolver could get into
  an infinite loop.
- Issue #234: Adding more options to the glide.yaml file including license,
  owners, homepage, etc. See the docs for more detail.
- Issue #237: Added Read The Docs support and initial docs. http://glide.readthedocs.org
- Issue #248: Uses go env to get value of GO15VENDOREXPERIMENT due to 1.6 enabling
  by default.
- Issue #240: Glide only scans used imports rather than all paths in the tree.
  The previous behavior is available via a flag.
- Fixed #235: Glide on windows writing incorrect slashes to files.
- Fixed #227: Fixed ensure when multiple gopaths.
- Refactored Glide
  - Many features broken out into packages. All but `action/` can be
    used as libraries.
  - Cookoo is not used anymore
  - The `action/` package replaces `cmd/`

# Release 0.8.3 (2015-12-30)

- Issue #198: Instead of stopping `glide install` for a hash failures providing
  a warning. Failed hash check is currently too aggressive.
- Fixed #199: `glide up` on Windows unable to detect dependencies when GOPATH
  and GOROOT on a different drive or when GOROOT ends in a path separator.
- Fixed #194: `glide up` stalling on Windows due to POSIX path separators and
  path list separators being used.
- Fixed #185 and #187: Inaccurate hash being generated for lock file with nested
  version ranges.
- Fixed #182 and #183: Caching on go-import lookups mishandled some prefixes.
- Fixed issue in deduping and sub-package names.
- Fixed #189: nested dependencies that do not contain VCS information were not
  being updated properly when --updated-vendored was being used.
- Fixed #186: glide up PACKAGE was failing to generate a proper glide.lock file.

# Release 0.8.2 (2015-12-21)

- Fixed #169: cookoo git url has auth info. Makes glide unbuildable for
  environments not setup for GitHub.
- Fixed #180: the hash in the glide.lock file was not being properly calculated.
- Fixed #174: glide get was causing an error when the flag --updated-vendored
  was being used.
- Fixed #175: glide get when the GOPATH isn't setup properly could end up in
  an infinite loop.

# Release 0.8.1 (2015-12-15)

- Fixed #163: Was detecting std lib packages when the GOROOT was different at
  runtime than compile time.
- Fixed #165: glide update panics with --no-recursive option.
- Added back zip build option to build scripts. This is useful for some
  environments.

# Release 0.8.0 (2015-12-10)

- Issues #156 and #85: Added lockfile support (glide.lock). This file records
  commit id pinned versions of the entire dependency tree. The `glide install`
  command installs the pinned dependencies from the `glide.lock` file while
  `glide update` updates the tree and lockfile. Most people should use `glide
  install` unless they want to intentionally updated the pinned dependencies.
  `glide install` is able to use concurrency to more quickly install update.
- Issues #33 and #159: Glide notifies if a dependency checkout has uncomitted
  changes.
- Issue #146: Glide scans projects not managed by a dependency manager, fetches
  their dependencies, and pins them in the glide.lock file.
- Issue #99: Glide `get` pins dependencies by default and allows a version to
  be passed in. For example, `glide get github.com/Masterminds/convert#^1.0.0`
  will fetch `github.com/Masterminds/convert` with a version of `^1.0.0`.
- Issue #155: Copying packages from the `GOPATH` is now opt-in.

# Release 0.7.2 (2015-11-16)

- Fixed #139: glide.yaml file imports being reordered when file written.
- Fixed #140: packages in glide.yaml were no longer being deduped.

# Release 0.7.1 (2015-11-10)

- Fixed #136: Fixed infinite recursion in list and tree commands.
- Fixed issue where glide guess listed a null parent.
- Fixed #135: Hard failure when home directory not found for cache.
- Fixed #137: Some messages not ending in "\n".
- Fixed #132 and #133: Build from source directions incorrect (thanks hyPiRion).

# Release 0.7.0 (2015-11-02)

- Fixed #110: Distribution as .tag.gz instead of .zip.
- Issue #126: Added --no-color option to remove color for systems that do not
  work well with color codes (thanks albrow).
- Added caching functionality (some opt-in).
- Added global debug flag.
- Moved yaml parsing and writing to gopkg.in/yaml.v2 and separated
  config handling into separate package.
- Better godep import handling.
- Fixed #98: Godep command name fix (thanks jonboulle).
- #52 and #114: Add semantic version (SemVer) support.
- #108: Flatten the dependency tree by default.
- Fixed #107: Allow `glide get` to retrieve insecure packages with `--insecure`
  flag.
- #105: Import commands accept a filename with the `-f` flag.
- Fixed #97: Fixed misspellings (thanks jonboulle).
- #96: Allow multiple packages in `glide get`.
- #92: Added support to `glide update` to only update a specific package.
- #91: `glide list` now displays if a pkg is in vendor, GOPATH, or missing.
- Issue #89: More robust GOPATH handling (thanks gcmt).
- Fixed #65: Hg commands were not checking out the codebase on the first update.
- Fixed #95: Added more detail for errors previously reporting "Oops! exit
  status 128".
- Fixed #86 and #71: Imported package names including a sub-package were checked
  out to the wrong location. They are not checked out to the right place and
  multiple instances of the top level repo are merged with error checking.

# Release 0.6.1 (2015-09-21)

- Fixed #82: C was not recognized as an internal package.
- Fixed #84: novendor (nv) command returned directories with no Go code.

# Release 0.6.0 (2015-09-16)

- #53: Add support for gb-vendor manifest files.
- Added `glide tree` command to inspect the code and see the imported packages.
- Added `glide list` to see an alphabetized list of imported projects.
- Added flatten feature to flatten the vendor tree (thanks interlock).
- Fixed #74: Glide guess using the wrong GOROOT locations in some environments
  (thanks janeczku).
- Fixed #76: Glide tree doesn't exclude core libraries with the GOROOT is
  incorrect (thanks janeczku).
- Fixed #81: rebuild command did not look in vendor/ directory
- Fixed #77: update failed when a commit id was set for the ref

# Release 0.5.1 (2015-08-31)

- Fixed #58: Guess command not working.
- Fixed #56: Unable to use glide get on golang.org/x/[name]/[subpackage]
- Fixed #61: The wrong version of a dependency can be pinned when packages are
  vendored (no VCS repo associated with them).
- Fixed #67: Unable to work go-get redirects.
- Fixed #66: 'glide up' now has an --update-vendored (-u) flag to update
  vendored directories.
- Fixed #68: Handling the base where the GOPATH has multiple separated directories.

# Release 0.5.0 (2015-08-19)

**Glide .5 is a major update breaking some backwards compatability with
previous releases.**

- Migrated to using the vendor/ directory and the go tools for vendor
  package management. To leverage this you'll need to set the
  environment variable GO15VENDOREXPERIMENT=1 and use Go 1.5.
- `glide up` is now recursive and walks installed packages if there is
  no vendor directory. Use the --no-recursive flag to skip this.
- Removed GOPATH management. This was needed for vendor package
  management that's not built into the go toolchain.
- Switched to github.com/Masterminds/vcs for VCS integration.
- When updating packages are now deleted if the --delete flag is set.
  This feature is now opt-in.
- Fixed #32: Detects VCS type and endpoint changes along with a --force flag
  to replace the checkout if desired.

# Release 0.4.1 (2015-07-13)

- Issue #48: When GOPATH not _vendor directory not deleting unused packages.

# Release 0.4.0 (2015-07-07)

- Issue #34: Delete unused packages on update unless flag set.
- Added 'glide create PACKAGE'
- Added 'glide exec COMMAND'
- Added 'glide get PACKAGE'
- Added 'glide pin FILENAME'
- Added 'glide guess FILENAME'
- Updated help text

# Release 0.3.0 (2015-06-17)

- Issue #46: If VCS type is set use that rather than go get.
- Issue #45: Added git fastpath if configured ref or tag matches current
  one. (via roblillack)
- Issue #30: Added support for changed VCS type to a git repo. (thanks roblillack)
- Issue #42: Fixed update for new dependencies where repo not configured.
  (thanks roblillack)
- Issue #25: Added GOOS and GOARCH support.
- Issue #35: Updated documentation on what update from existing repos means
- Issue #37: Added support to import from GPM and Godep
- Issue #36: Added example for shell (bash/zsh) prompt to show the current
  GOPATH. (thanks eAndrius)
- Issue #31: The local Go bin should be higher precedence in the
  system's PATH (via jarod).
- Issue #28: Use HTTPS instead of HTTP for git and hg. (Thanks chendo)
- Issue #26: 'glide gopath' is smarter. It now looks for glide.yaml.
- Issue #24: Trim whitespace off of package names. (Thanks roblillack)

# Release 0.2.0 (2014-10-03)

- Issue #15, #18: `glide guess` can guess dependencies for an existing
  repo. (HUGE thanks to dz0ny)
- Issue #14: Glide fails now when YAML is invalid.
- Issue #13: cli.go added to Makefile (via roblillack)
- Issue #12: InitGlide takes YAML file now
- Issue #9: Fixed handling of $SHELL (Thanks roblillack)
- Issue #10: Symbolic link uses a relative path now (Thanks roblillack)
- Issue #5: Build step is deferred when 'go get' is used to fetch
  packages. (Thanks gsalgado)
- Issue #11: Add GOBIN to glide environment (via dz0ny)
- Typos fixed (#17 by lamielle, #16 by roblillack)
- Moved the CLI handling to cli.go (github.com/codegangsta/cli)


================================================
FILE: LICENSE
================================================
Glide
The Masterminds
Copyright (C) 2014-2016, Matt Butcher and Matt Farina
Copyright (C) 2016, Hewlett Packard Enterprise Development LP
Copyright (C) 2015, Google

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


================================================
FILE: Makefile
================================================
GLIDE_GO_EXECUTABLE ?= go
DIST_DIRS := find * -type d -exec
VERSION ?= $(shell git describe --tags)
VERSION_INCODE = $(shell perl -ne '/^var version.*"([^"]+)".*$$/ && print "v$$1\n"' glide.go)
VERSION_INCHANGELOG = $(shell perl -ne '/^\# Release (\d+(\.\d+)+) / && print "$$1\n"' CHANGELOG.md | head -n1)

build:
	${GLIDE_GO_EXECUTABLE} build -o glide -ldflags "-X main.version=${VERSION}" glide.go

install: build
	install -d ${DESTDIR}/usr/local/bin/
	install -m 755 ./glide ${DESTDIR}/usr/local/bin/glide

test:
	${GLIDE_GO_EXECUTABLE} test . ./gb ./path ./action ./tree ./util ./godep ./godep/strip ./gpm ./cfg ./dependency ./importer ./msg ./repo ./mirrors

integration-test:
	${GLIDE_GO_EXECUTABLE} build
	./glide up
	./glide install

clean:
	rm -f ./glide.test
	rm -f ./glide
	rm -rf ./dist

bootstrap-dist:
	${GLIDE_GO_EXECUTABLE} get -u github.com/Masterminds/gox

build-all:
	gox -verbose \
	-ldflags "-X main.version=${VERSION}" \
	-os="linux darwin windows freebsd openbsd netbsd" \
	-arch="amd64 386 armv5 armv6 armv7 arm64 s390x" \
	-osarch="!darwin/arm64" \
	-output="dist/{{.OS}}-{{.Arch}}/{{.Dir}}" .

dist: build-all
	cd dist && \
	$(DIST_DIRS) cp ../LICENSE {} \; && \
	$(DIST_DIRS) cp ../README.md {} \; && \
	$(DIST_DIRS) tar -zcf glide-${VERSION}-{}.tar.gz {} \; && \
	$(DIST_DIRS) zip -r glide-${VERSION}-{}.zip {} \; && \
	cd ..

verify-version:
	@if [ "$(VERSION_INCODE)" = "v$(VERSION_INCHANGELOG)" ]; then \
		echo "glide: $(VERSION_INCHANGELOG)"; \
	elif [ "$(VERSION_INCODE)" = "v$(VERSION_INCHANGELOG)-dev" ]; then \
		echo "glide (development): $(VERSION_INCHANGELOG)"; \
	else \
		echo "Version number in glide.go does not match CHANGELOG.md"; \
		echo "glide.go: $(VERSION_INCODE)"; \
		echo "CHANGELOG : $(VERSION_INCHANGELOG)"; \
		exit 1; \
	fi

.PHONY: build test install clean bootstrap-dist build-all dist integration-test verify-version


================================================
FILE: README.md
================================================
# Glide: Vendor Package Management for Golang

![glide logo](https://glide.sh/assets/logo-small.png)

Are you used to tools such as Cargo, npm, Composer, Nuget, Pip, Maven, Bundler,
or other modern package managers? If so, Glide is the comparable Go tool.

*Manage your vendor and vendored packages with ease.* Glide is a tool for
managing the `vendor` directory within a Go package. This feature, first
introduced in Go 1.5, allows each package to have a `vendor` directory
containing dependent packages for the project. These vendor packages can be
installed by a tool (e.g. glide), similar to `go get` or they can be vendored and
distributed with the package.

[![Build Status](https://travis-ci.org/Masterminds/glide.svg)](https://travis-ci.org/Masterminds/glide)
[![Build status](https://ci.appveyor.com/api/projects/status/3pl4ytgdlfj852li?svg=true&passingText=windows%20build%20passing&failingText=windows%20build%20failing)](https://ci.appveyor.com/project/mattfarina/glide-a8xtg)
[![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/glide)](https://goreportcard.com/report/github.com/Masterminds/glide) [![GoDoc](https://godoc.org/github.com/Masterminds/glide?status.svg)](https://godoc.org/github.com/Masterminds/glide) [![Documentation Status](https://readthedocs.org/projects/glide/badge/?version=stable)](http://glide.readthedocs.org/en/stable/?badge=stable) [![Documentation Status](https://readthedocs.org/projects/glide/badge/?version=latest)](http://glide.readthedocs.org/en/latest/?badge=latest)

### Go Modules

The Go community is now using Go Modules to handle dependencies. Please consider
using that instead of Glide. Glide is now mostly unmaintained.

### Features

* Ease dependency management
* Support **versioning packages** including [Semantic Versioning
  2.0.0](http://semver.org/) support. Any constraint the [`github.com/Masterminds/semver`](https://github.com/Masterminds/semver)
  package can parse can be used.
* Support **aliasing packages** (e.g. for working with github forks)
* Remove the need for munging import statements
* Work with all of the `go` tools
* Support the VCS tools that Go supports:
    - git
    - bzr
    - hg
    - svn
* Support custom local and global plugins (see docs/plugins.md)
* Repository caching and data caching for improved performance.
* Flatten dependencies resolving version differences and avoiding the inclusion
  of a package multiple times.
* Manage and install dependencies on-demand or vendored in your version control
  system.

## How It Works

Glide scans the source code of your application or library to determine the needed
dependencies. To determine the versions and locations (such as aliases for forks)
Glide reads a `glide.yaml` file with the rules. With this information Glide retrieves
needed dependencies.

When a dependent package is encountered its imports are scanned to determine
dependencies of dependencies (transitive dependencies). If the dependent project
contains a `glide.yaml` file that information is used to help determine the
dependency rules when fetching from a location or version to use. Configuration
from Godep, GB, GOM, and GPM is also imported.

The dependencies are exported to the `vendor/` directory where the `go` tools
can find and use them. A `glide.lock` file is generated containing all the
dependencies, including transitive ones.

The `glide init` command can be use to setup a new project, `glide update`
regenerates the dependency versions using scanning and rules, and `glide install`
will install the versions listed in the `glide.lock` file, skipping scanning,
unless the `glide.lock` file is not found in which case it will perform an update.

A project is structured like this:

```
- $GOPATH/src/myProject (Your project)
  |
  |-- glide.yaml
  |
  |-- glide.lock
  |
  |-- main.go (Your main go code can live here)
  |
  |-- mySubpackage (You can create your own subpackages, too)
  |    |
  |    |-- foo.go
  |
  |-- vendor
       |-- github.com
            |
            |-- Masterminds
                  |
                  |-- ... etc.
```

*Take a look at [the Glide source code](http://github.com/Masterminds/glide)
to see this philosophy in action.*

## Install

The easiest way to install the latest release on Mac or Linux is with the following script:

```
curl https://glide.sh/get | sh
```

On Mac OS X you can also install the latest release via [Homebrew](https://github.com/Homebrew/homebrew):

```
$ brew install glide
```

On Ubuntu Precise (12.04), Trusty (14.04), Wily (15.10) or Xenial (16.04) you can install from our PPA:

```
sudo add-apt-repository ppa:masterminds/glide && sudo apt-get update
sudo apt-get install glide
```

On Ubuntu Zesty (17.04) the package is called `golang-glide`.

[Binary packages](https://github.com/Masterminds/glide/releases) are available for Mac, Linux and Windows.

For a development version it is also possible to `go get github.com/Masterminds/glide`.

To build from source you can:

1. Clone this repository into `$GOPATH/src/github.com/Masterminds/glide` and
   change directory into it
2. If you are using Go 1.5 ensure the environment variable GO15VENDOREXPERIMENT is set, for
   example by running `export GO15VENDOREXPERIMENT=1`. In Go 1.6 it is enabled by default and
   in Go 1.7 it is always enabled without the ability to turn it off.
3. Run `make build`

This will leave you with `./glide`, which you can put in your `$PATH` if
you'd like. (You can also take a look at `make install` to install for
you.)

The Glide repo has now been configured to use glide to
manage itself, too.

## Usage

```
$ glide create                            # Start a new workspace
$ open glide.yaml                         # and edit away!
$ glide get github.com/Masterminds/cookoo # Get a package and add to glide.yaml
$ glide install                           # Install packages and dependencies
# work, work, work
$ go build                                # Go tools work normally
$ glide up                                # Update to newest versions of the package
```

Check out the `glide.yaml` in this directory, or examples in the `docs/`
directory.

### glide create (aliased to init)

Initialize a new workspace. Among other things, this creates a `glide.yaml` file
while attempting to guess the packages and versions to put in it. For example,
if your project is using Godep it will use the versions specified there. Glide
is smart enough to scan your codebase and detect the imports being used whether
they are specified with another package manager or not.

```
$ glide create
[INFO]	Generating a YAML configuration file and guessing the dependencies
[INFO]	Attempting to import from other package managers (use --skip-import to skip)
[INFO]	Scanning code to look for dependencies
[INFO]	--> Found reference to github.com/Masterminds/semver
[INFO]	--> Found reference to github.com/Masterminds/vcs
[INFO]	--> Found reference to github.com/codegangsta/cli
[INFO]	--> Found reference to gopkg.in/yaml.v2
[INFO]	Writing configuration file (glide.yaml)
[INFO]	Would you like Glide to help you find ways to improve your glide.yaml configuration?
[INFO]	If you want to revisit this step you can use the config-wizard command at any time.
[INFO]	Yes (Y) or No (N)?
n
[INFO]	You can now edit the glide.yaml file. Consider:
[INFO]	--> Using versions and ranges. See https://glide.sh/docs/versions/
[INFO]	--> Adding additional metadata. See https://glide.sh/docs/glide.yaml/
[INFO]	--> Running the config-wizard command to improve the versions in your configuration
```

The `config-wizard`, noted here, can be run here or manually run at a later time.
This wizard helps you figure out versions and ranges you can use for your
dependencies.

### glide config-wizard

This runs a wizard that scans your dependencies and retrieves information on them
to offer up suggestions that you can interactively choose. For example, it can
discover if a dependency uses semantic versions and help you choose the version
ranges to use.

### glide get [package name]

You can download one or more packages to your `vendor` directory and have it added to your
`glide.yaml` file with `glide get`.

```
$ glide get github.com/Masterminds/cookoo
```

When `glide get` is used it will introspect the listed package to resolve its
dependencies including using Godep, GPM, Gom, and GB config files.

### glide update (aliased to up)

Download or update all of the libraries listed in the `glide.yaml` file and put
them in the `vendor` directory. It will also recursively walk through the
dependency packages to fetch anything that's needed and read in any configuration.

```
$ glide up
```

This will recurse over the packages looking for other projects managed by Glide,
Godep, gb, gom, and GPM. When one is found those packages will be installed as needed.

A `glide.lock` file will be created or updated with the dependencies pinned to
specific versions. For example, if in the `glide.yaml` file a version was
specified as a range (e.g., `^1.2.3`) it will be set to a specific commit id in
the `glide.lock` file. That allows for reproducible installs (see `glide install`).

To remove any nested `vendor/` directories from fetched packages see the `-v` flag.

### glide install

When you want to install the specific versions from the `glide.lock` file use
`glide install`.

```
$ glide install
```

This will read the `glide.lock` file and install the commit id specific versions
there.

When the `glide.lock` file doesn't tie to the `glide.yaml` file, such as there
being a change, it will provide a warning. Running `glide up` will recreate the
`glide.lock` file when updating the dependency tree.

If no `glide.lock` file is present `glide install` will perform an `update` and
generate a lock file.

To remove any nested `vendor/` directories from fetched packages see the `-v` flag.

## glide novendor (aliased to nv)

When you run commands like `go test ./...` it will iterate over all the
subdirectories including the `vendor` directory. When you are testing your
application you may want to test your application files without running all the
tests of your dependencies and their dependencies. This is where the `novendor`
command comes in. It lists all of the directories except `vendor`.

    $ go test $(glide novendor)

This will run `go test` over all directories of your project except the
`vendor` directory.

## glide name

When you're scripting with Glide there are occasions where you need to know
the name of the package you're working on. `glide name` returns the name of the
package listed in the `glide.yaml` file.

### glide tree

Glide includes a few commands that inspect code and give you details
about what is imported. `glide tree` is one such command. Running it
gives data like this:

```
$ glide tree
github.com/Masterminds/glide
	github.com/Masterminds/cookoo   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo)
		github.com/Masterminds/cookoo/io   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo/io)
	github.com/Masterminds/glide/cmd   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/cmd)
		github.com/Masterminds/cookoo   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo)
			github.com/Masterminds/cookoo/io   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo/io)
		github.com/Masterminds/glide/gb   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/gb)
		github.com/Masterminds/glide/util   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/util)
			github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
		github.com/Masterminds/glide/yaml   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/yaml)
			github.com/Masterminds/glide/util   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/util)
				github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
			github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
			gopkg.in/yaml.v2   (/Users/mfarina/Code/go/src/gopkg.in/yaml.v2)
		github.com/Masterminds/semver   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/semver)
		github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
		github.com/codegangsta/cli   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli)
	github.com/codegangsta/cli   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli)
	github.com/Masterminds/cookoo   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo)
		github.com/Masterminds/cookoo/io   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo/io)
	github.com/Masterminds/glide/gb   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/gb)
	github.com/Masterminds/glide/util   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/util)
		github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
	github.com/Masterminds/glide/yaml   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/yaml)
		github.com/Masterminds/glide/util   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/util)
			github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
		github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
		gopkg.in/yaml.v2   (/Users/mfarina/Code/go/src/gopkg.in/yaml.v2)
	github.com/Masterminds/semver   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/semver)
	github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
	github.com/codegangsta/cli   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli)
```

This shows a tree of imports, excluding core libraries. Because
vendoring makes it possible for the same package to live in multiple
places, `glide tree` also prints the location of the package being
imported.

_This command is deprecated and will be removed in the near future._

### glide list

Glide's `list` command shows an alphabetized list of all the packages
that a project imports.

```
$ glide list
INSTALLED packages:
	vendor/github.com/Masterminds/cookoo
	vendor/github.com/Masterminds/cookoo/fmt
	vendor/github.com/Masterminds/cookoo/io
	vendor/github.com/Masterminds/cookoo/web
	vendor/github.com/Masterminds/semver
	vendor/github.com/Masterminds/vcs
	vendor/github.com/codegangsta/cli
	vendor/gopkg.in/yaml.v2
```

### glide help

Print the glide help.

```
$ glide help
```

### glide --version

Print the version and exit.

```
$ glide --version
glide version 0.12.0
```

### glide.yaml

For full details on the `glide.yaml` files see [the documentation](https://glide.sh/docs/glide.yaml).

The `glide.yaml` file does two critical things:

1. It names the current package
2. It declares external dependencies

A brief `glide.yaml` file looks like this:

```yaml
package: github.com/Masterminds/glide
import:
  - package: github.com/Masterminds/semver
  - package: github.com/Masterminds/cookoo
    version: ^1.2.0
    repo: git@github.com:Masterminds/cookoo.git
```

The above tells `glide` that...

1. This package is named `github.com/Masterminds/glide`
2. That this package depends on two libraries.

The first library exemplifies a minimal package import. It merely gives
the fully qualified import path.

When Glide reads the definition for the second library, it will get the repo
from the source in `repo`, checkout the latest version between 1.2.0 and 2.0.0,
and put it in `github.com/Masterminds/cookoo` in the `vendor` directory. (Note
that `package` and `repo` can be completely different)

**TIP:** The version is either VCS dependent and can be anything that can be checked
out or a semantic version constraint that can be parsed by the [`github.com/
Masterminds/semver`](https://github.com/Masterminds/semver) package.
For example, with Git this can be a branch, tag, or hash. This varies and
depends on what's supported in the VCS.

**TIP:** In general, you are advised to use the *base package name* for
importing a package, not a subpackage name. For example, use
`github.com/kylelemons/go-gypsy` and not
`github.com/kylelemons/go-gypsy/yaml`.

## Supported Version Control Systems

The Git, SVN, Mercurial (Hg), and Bzr source control systems are supported. This
happens through the [vcs package](https://github.com/masterminds/vcs).

## Frequently Asked Questions (F.A.Q.)

#### Q: Why does Glide have the concept of sub-packages when Go doesn't?

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.

#### Q: bzr (or hg) is not working the way I expected. Why?

These are works in progress, and may need some additional tuning. Please
take a look at the [vcs package](https://github.com/masterminds/vcs). If you
see a better way to handle it please let us know.

#### Q: Should I check `vendor/` into version control?

That's up to you. It's not necessary, but it may also cause you extra
work and lots of extra space in your VCS. There may also be unforeseen errors
([see an example](https://github.com/mattfarina/golang-broken-vendor)).

#### Q: How do I import settings from GPM, Godep, gom or gb?

There are two parts to importing.

1. If a package you import has configuration for GPM, Godep, gom or gb Glide will
   recursively install the dependencies automatically.
2. If you would like to import configuration from GPM, Godep, gom or gb to Glide see
   the `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
```

#### Q: Can Glide fetch a package based on OS or Arch?

A: 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:

```yaml
- package: some/package
  os:
    - darwin
  arch:
    - amd64
```

The package will not be fetched for other architectures or OSes.

## LICENSE

This package is made available under an MIT-style license. See
LICENSE.txt.

## Thanks!

We owe a huge debt of gratitude to the [GPM and
GVP](https://github.com/pote/gpm) projects, which
inspired many of the features of this package. If `glide` isn't the
right Go project manager for you, check out those.

The Composer (PHP), npm (JavaScript), and Bundler (Ruby) projects all
inspired various aspects of this tool, as well.

## The Name

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.


================================================
FILE: action/about.go
================================================
package action

import "github.com/Masterminds/glide/msg"

const aboutMessage = `
Glide: Vendor Package Management for Go. Manage your vendor and vendored
packages with ease.

Name:
    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.

To file issues, obtain the source, or learn more visit:
    https://github.com/Masterminds/glide

Glide is licensed under the MIT License:

    Copyright (C) 2014-2015, Matt Butcher and Matt Farina
    Copyright (C) 2015, Google

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.`

// About prints information about Glide.
func About() {
	msg.Puts(aboutMessage)
}


================================================
FILE: action/about_test.go
================================================
package action

import (
	"bytes"
	"testing"

	"github.com/Masterminds/glide/msg"
)

func TestAbout(t *testing.T) {
	var buf bytes.Buffer
	old := msg.Default.Stdout
	msg.Default.Stdout = &buf
	About()

	if buf.Len() < len(aboutMessage) {
		t.Errorf("expected this to match aboutMessage: %q", buf.String())
	}

	msg.Default.Stdout = old
}


================================================
FILE: action/cache.go
================================================
package action

import (
	"os"

	"github.com/Masterminds/glide/cache"
	"github.com/Masterminds/glide/msg"
)

// CacheClear clears the Glide cache
func CacheClear() {
	l := cache.Location()

	err := os.RemoveAll(l)
	if err != nil {
		msg.Die("Unable to clear the cache: %s", err)
	}

	cache.SetupReset()
	cache.Setup()

	msg.Info("Glide cache has been cleared.")
}


================================================
FILE: action/config_wizard.go
================================================
package action

import (
	"os"
	"os/exec"
	"path/filepath"
	"regexp"
	"strings"

	"github.com/Masterminds/glide/cache"
	"github.com/Masterminds/glide/cfg"
	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
	"github.com/Masterminds/semver"
	"github.com/Masterminds/vcs"
)

// ConfigWizard reads configuration from a glide.yaml file and attempts to suggest
// improvements. The wizard is interactive.
func ConfigWizard(base string) {
	cache.SystemLock()
	_, err := gpath.Glide()
	glidefile := gpath.GlideFile
	if err != nil {
		msg.Info("Unable to find a glide.yaml file. Would you like to create one now? Yes (Y) or No (N)")
		bres := msg.PromptUntilYorN()
		if bres {
			// Guess deps
			conf := guessDeps(base, false)
			// Write YAML
			if err := conf.WriteFile(glidefile); err != nil {
				msg.Die("Could not save %s: %s", glidefile, err)
			}
		} else {
			msg.Err("Unable to find configuration file. Please create configuration information to continue.")
		}
	}

	conf := EnsureConfig()

	cache.Setup()

	msg.Info("Looking for dependencies to make suggestions on")
	msg.Info("--> Scanning for dependencies not using version ranges")
	msg.Info("--> Scanning for dependencies using commit ids")
	var deps []*cfg.Dependency
	for _, dep := range conf.Imports {
		if wizardLookInto(dep) {
			deps = append(deps, dep)
		}
	}
	for _, dep := range conf.DevImports {
		if wizardLookInto(dep) {
			deps = append(deps, dep)
		}
	}

	msg.Info("Gathering information on each dependency")
	msg.Info("--> This may take a moment. Especially on a codebase with many dependencies")
	msg.Info("--> Gathering release information for dependencies")
	msg.Info("--> Looking for dependency imports where versions are commit ids")
	for _, dep := range deps {
		wizardFindVersions(dep)
	}

	var changes int
	for _, dep := range deps {
		remote := dep.Remote()

		// First check, ask if the tag should be used instead of the commit id for it.
		cur := cache.MemCurrent(remote)
		if cur != "" && cur != dep.Reference {
			wizardSugOnce()
			var dres bool
			asked, use, val := wizardOnce("current")
			if !use {
				dres = wizardAskCurrent(cur, dep)
			}
			if !asked {
				as := wizardRemember()
				wizardSetOnce("current", as, dres)
			}

			if asked && use {
				dres = val.(bool)
			}

			if dres {
				msg.Info("Updating %s to use the tag %s instead of commit id %s", dep.Name, cur, dep.Reference)
				dep.Reference = cur
				changes++
			}
		}

		// Second check, if no version is being used and there's a semver release ask about latest.
		memlatest := cache.MemLatest(remote)
		if dep.Reference == "" && memlatest != "" {
			wizardSugOnce()
			var dres bool
			asked, use, val := wizardOnce("latest")
			if !use {
				dres = wizardAskLatest(memlatest, dep)
			}
			if !asked {
				as := wizardRemember()
				wizardSetOnce("latest", as, dres)
			}

			if asked && use {
				dres = val.(bool)
			}

			if dres {
				msg.Info("Updating %s to use the release %s instead of no release", dep.Name, memlatest)
				dep.Reference = memlatest
				changes++
			}
		}

		// Third check, if the version is semver offer to use a range instead.
		sv, err := semver.NewVersion(dep.Reference)
		if err == nil {
			wizardSugOnce()
			var res string
			asked, use, val := wizardOnce("range")
			if !use {
				res = wizardAskRange(sv, dep)
			}
			if !asked {
				as := wizardRemember()
				wizardSetOnce("range", as, res)
			}

			if asked && use {
				res = val.(string)
			}

			if res == "m" {
				r := "^" + sv.String()
				msg.Info("Updating %s to use the range %s instead of commit id %s", dep.Name, r, dep.Reference)
				dep.Reference = r
				changes++
			} else if res == "p" {
				r := "~" + sv.String()
				msg.Info("Updating %s to use the range %s instead of commit id %s", dep.Name, r, dep.Reference)
				dep.Reference = r
				changes++
			}
		}
	}

	if changes > 0 {
		msg.Info("Configuration changes have been made. Would you like to write these")
		msg.Info("changes to your configuration file? Yes (Y) or No (N)")
		dres := msg.PromptUntilYorN()
		if dres {
			msg.Info("Writing updates to configuration file (%s)", glidefile)
			if err := conf.WriteFile(glidefile); err != nil {
				msg.Die("Could not save %s: %s", glidefile, err)
			}
			msg.Info("You can now edit the glide.yaml file.:")
			msg.Info("--> For more information on versions and ranges see https://glide.sh/docs/versions/")
			msg.Info("--> For details on additional metadata see https://glide.sh/docs/glide.yaml/")
		} else {
			msg.Warn("Change not written to configuration file")
		}
	} else {
		msg.Info("No proposed changes found. Have a nice day.")
	}
}

var wizardOnceVal = make(map[string]interface{})
var wizardOnceDo = make(map[string]bool)
var wizardOnceAsked = make(map[string]bool)

var wizardSuggeseOnce bool

func wizardSugOnce() {
	if !wizardSuggeseOnce {
		msg.Info("Here are some suggestions...")
	}
	wizardSuggeseOnce = true
}

// Returns if it's you should prompt, if not prompt if you should use stored value,
// and stored value if it has one.
func wizardOnce(name string) (bool, bool, interface{}) {
	return wizardOnceAsked[name], wizardOnceDo[name], wizardOnceVal[name]
}

func wizardSetOnce(name string, prompt bool, val interface{}) {
	wizardOnceAsked[name] = true
	wizardOnceDo[name] = prompt
	wizardOnceVal[name] = val
}

func wizardRemember() bool {
	msg.Info("Would you like to remember the previous decision and apply it to future")
	msg.Info("dependencies? Yes (Y) or No (N)")
	return msg.PromptUntilYorN()
}

func wizardAskRange(ver *semver.Version, d *cfg.Dependency) string {
	vstr := ver.String()
	msg.Info("The package %s appears to use semantic versions (http://semver.org).", d.Name)
	msg.Info("Would you like to track the latest minor or patch releases (major.minor.patch)?")
	msg.Info("The choices are:")
	msg.Info(" - Tracking minor version releases would use '>= %s, < %d.0.0' ('^%s')", vstr, ver.Major()+1, vstr)
	msg.Info(" - Tracking patch version releases would use '>= %s, < %d.%d.0' ('~%s')", vstr, ver.Major(), ver.Minor()+1, vstr)
	msg.Info(" - Skip using ranges\n")
	msg.Info("For more information on Glide versions and ranges see https://glide.sh/docs/versions")
	msg.Info("Minor (M), Patch (P), or Skip Ranges (S)?")

	res, err := msg.PromptUntil([]string{"minor", "m", "patch", "p", "skip ranges", "s"})
	if err != nil {
		msg.Die("Error processing response: %s", err)
	}
	if res == "m" || res == "minor" {
		return "m"
	} else if res == "p" || res == "patch" {
		return "p"
	}

	return "s"
}

func wizardAskCurrent(cur string, d *cfg.Dependency) bool {
	msg.Info("The package %s is currently set to use the version %s.", d.Name, d.Reference)
	msg.Info("There is an equivalent semantic version (http://semver.org) release of %s. Would", cur)
	msg.Info("you like to use that instead? Yes (Y) or No (N)")
	return msg.PromptUntilYorN()
}

func wizardAskLatest(latest string, d *cfg.Dependency) bool {
	msg.Info("The package %s appears to have Semantic Version releases (http://semver.org). ", d.Name)
	msg.Info("The latest release is %s. You are currently not using a release. Would you like", latest)
	msg.Info("to use this release? Yes (Y) or No (N)")
	return msg.PromptUntilYorN()
}

func wizardLookInto(d *cfg.Dependency) bool {
	_, err := semver.NewConstraint(d.Reference)

	// The existing version is already a valid semver constraint so we skip suggestions.
	if err == nil {
		return false
	}

	return true
}

// Note, this really needs a simpler name.
var createGitParseVersion = regexp.MustCompile(`(?m-s)(?:tags)/(\S+)$`)

func wizardFindVersions(d *cfg.Dependency) {
	l := cache.Location()
	remote := d.Remote()

	key, err := cache.Key(remote)
	if err != nil {
		msg.Debug("Problem generating cache key for %s: %s", remote, err)
		return
	}

	local := filepath.Join(l, "src", key)
	repo, err := vcs.NewRepo(remote, local)
	if err != nil {
		msg.Debug("Problem getting repo instance: %s", err)
		return
	}

	var useLocal bool
	if _, err = os.Stat(local); err == nil {
		useLocal = true
	}

	// Git endpoints allow for querying without fetching the codebase locally.
	// We try that first to avoid fetching right away. Is this premature
	// optimization?
	cc := true
	if !useLocal && repo.Vcs() == vcs.Git {
		out, err2 := exec.Command("git", "ls-remote", remote).CombinedOutput()
		if err2 == nil {
			cache.MemTouch(remote)
			cc = false
			lines := strings.Split(string(out), "\n")
			for _, i := range lines {
				ti := strings.TrimSpace(i)
				if found := createGitParseVersion.FindString(ti); found != "" {
					tg := strings.TrimPrefix(strings.TrimSuffix(found, "^{}"), "tags/")
					cache.MemPut(remote, tg)
					if d.Reference != "" && strings.HasPrefix(ti, d.Reference) {
						cache.MemSetCurrent(remote, tg)
					}
				}
			}
		}
	}

	if cc {
		cache.Lock(key)
		cache.MemTouch(remote)
		if _, err = os.Stat(local); os.IsNotExist(err) {
			repo.Get()
			branch := findCurrentBranch(repo)
			c := cache.RepoInfo{DefaultBranch: branch}
			err = cache.SaveRepoData(key, c)
			if err != nil {
				msg.Debug("Error saving cache repo details: %s", err)
			}
		} else {
			repo.Update()
		}
		tgs, err := repo.Tags()
		if err != nil {
			msg.Debug("Problem getting tags: %s", err)
		} else {
			for _, v := range tgs {
				cache.MemPut(remote, v)
			}
		}
		if d.Reference != "" && repo.IsReference(d.Reference) {
			tgs, err = repo.TagsFromCommit(d.Reference)
			if err != nil {
				msg.Debug("Problem getting tags for commit: %s", err)
			} else {
				if len(tgs) > 0 {
					for _, v := range tgs {
						if !(repo.Vcs() == vcs.Hg && v == "tip") {
							cache.MemSetCurrent(remote, v)
						}
					}
				}
			}
		}
		cache.Unlock(key)
	}
}

func findCurrentBranch(repo vcs.Repo) string {
	msg.Debug("Attempting to find current branch for %s", repo.Remote())
	// Svn and Bzr don't have default branches.
	if repo.Vcs() == vcs.Svn || repo.Vcs() == vcs.Bzr {
		return ""
	}

	if repo.Vcs() == vcs.Git || repo.Vcs() == vcs.Hg {
		ver, err := repo.Current()
		if err != nil {
			msg.Debug("Unable to find current branch for %s, error: %s", repo.Remote(), err)
			return ""
		}
		return ver
	}

	return ""
}


================================================
FILE: action/create.go
================================================
package action

import (
	"os"
	"path/filepath"
	"sort"
	"strings"

	"github.com/Masterminds/glide/cfg"
	"github.com/Masterminds/glide/dependency"
	"github.com/Masterminds/glide/gb"
	"github.com/Masterminds/glide/godep"
	"github.com/Masterminds/glide/gpm"
	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
	"github.com/Masterminds/glide/util"
)

// 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 Create(base string, skipImport, nonInteractive bool) {
	glidefile := gpath.GlideFile
	// Guard against overwrites.
	guardYAML(glidefile)

	// Guess deps
	conf := guessDeps(base, skipImport)
	// Write YAML
	msg.Info("Writing configuration file (%s)", glidefile)
	if err := conf.WriteFile(glidefile); err != nil {
		msg.Die("Could not save %s: %s", glidefile, err)
	}

	var res bool
	if !nonInteractive {
		msg.Info("Would you like Glide to help you find ways to improve your glide.yaml configuration?")
		msg.Info("If you want to revisit this step you can use the config-wizard command at any time.")
		msg.Info("Yes (Y) or No (N)?")
		res = msg.PromptUntilYorN()
		if res {
			ConfigWizard(base)
		}
	}

	if !res {
		msg.Info("You can now edit the glide.yaml file. Consider:")
		msg.Info("--> Using versions and ranges. See https://glide.sh/docs/versions/")
		msg.Info("--> Adding additional metadata. See https://glide.sh/docs/glide.yaml/")
		msg.Info("--> Running the config-wizard command to improve the versions in your configuration")
	}
}

// guardYAML fails if the given file already exists.
//
// This prevents an important file from being overwritten.
func guardYAML(filename string) {
	if _, err := os.Stat(filename); err == nil {
		msg.Die("Cowardly refusing to overwrite existing YAML.")
	}
}

// guessDeps attempts to resolve all of the dependencies for a given project.
//
// base is the directory to start with.
// skipImport will skip running the automatic imports.
//
// FIXME: This function is likely a one-off that has a more standard alternative.
// It's also long and could use a refactor.
func guessDeps(base string, skipImport bool) *cfg.Config {
	buildContext, err := util.GetBuildContext()
	if err != nil {
		msg.Die("Failed to build an import context: %s", err)
	}
	name := buildContext.PackageName(base)

	msg.Info("Generating a YAML configuration file and guessing the dependencies")

	config := new(cfg.Config)

	// Get the name of the top level package
	config.Name = name

	// Import by looking at other package managers and looking over the
	// entire directory structure.

	// Attempt to import from other package managers.
	if !skipImport {
		guessImportDeps(base, config)
	}

	importLen := len(config.Imports)
	if importLen == 0 {
		msg.Info("Scanning code to look for dependencies")
	} else {
		msg.Info("Scanning code to look for dependencies not found in import")
	}

	// Resolve dependencies by looking at the tree.
	r, err := dependency.NewResolver(base)
	if err != nil {
		msg.Die("Error creating a dependency resolver: %s", err)
	}

	// When creating resolve the test dependencies as well as the application ones.
	r.ResolveTest = true

	h := &dependency.DefaultMissingPackageHandler{Missing: []string{}, Gopath: []string{}}
	r.Handler = h

	sortable, testSortable, err := r.ResolveLocal(false)
	if err != nil {
		msg.Die("Error resolving local dependencies: %s", err)
	}

	sort.Strings(sortable)
	sort.Strings(testSortable)

	vpath := r.VendorDir
	if !strings.HasSuffix(vpath, "/") {
		vpath = vpath + string(os.PathSeparator)
	}

	for _, pa := range sortable {
		n := strings.TrimPrefix(pa, vpath)
		root, subpkg := util.NormalizeName(n)

		if !config.Imports.Has(root) && root != config.Name {
			msg.Info("--> Found reference to %s\n", n)
			d := &cfg.Dependency{
				Name: root,
			}
			if len(subpkg) > 0 {
				d.Subpackages = []string{subpkg}
			}
			config.Imports = append(config.Imports, d)
		} else if config.Imports.Has(root) {
			if len(subpkg) > 0 {
				subpkg = strings.TrimPrefix(subpkg, "/")
				d := config.Imports.Get(root)
				if !d.HasSubpackage(subpkg) {
					msg.Info("--> Adding sub-package %s to %s\n", subpkg, root)
					d.Subpackages = append(d.Subpackages, subpkg)
				}
			}
		}
	}

	for _, pa := range testSortable {
		n := strings.TrimPrefix(pa, vpath)
		root, subpkg := util.NormalizeName(n)

		if config.Imports.Has(root) && root != config.Name {
			msg.Debug("--> Found test reference to %s already listed as an import", n)
		} else if !config.DevImports.Has(root) && root != config.Name {
			msg.Info("--> Found test reference to %s", n)
			d := &cfg.Dependency{
				Name: root,
			}
			if len(subpkg) > 0 {
				d.Subpackages = []string{subpkg}
			}
			config.DevImports = append(config.DevImports, d)
		} else if config.DevImports.Has(root) {
			if len(subpkg) > 0 {
				subpkg = strings.TrimPrefix(subpkg, "/")
				d := config.DevImports.Get(root)
				if !d.HasSubpackage(subpkg) {
					msg.Info("--> Adding test sub-package %s to %s\n", subpkg, root)
					d.Subpackages = append(d.Subpackages, subpkg)
				}
			}
		}
	}

	if len(config.Imports) == importLen && importLen != 0 {
		msg.Info("--> Code scanning found no additional imports")
	}

	return config
}

func guessImportDeps(base string, config *cfg.Config) {
	msg.Info("Attempting to import from other package managers (use --skip-import to skip)")
	deps := []*cfg.Dependency{}
	absBase, err := filepath.Abs(base)
	if err != nil {
		msg.Die("Failed to resolve location of %s: %s", base, err)
	}

	if d, ok := guessImportGodep(absBase); ok {
		msg.Info("Importing Godep configuration")
		msg.Warn("Godep uses commit id versions. Consider using Semantic Versions with Glide")
		deps = d
	} else if d, ok := guessImportGPM(absBase); ok {
		msg.Info("Importing GPM configuration")
		deps = d
	} else if d, ok := guessImportGB(absBase); ok {
		msg.Info("Importing GB configuration")
		deps = d
	}

	for _, i := range deps {
		if i.Reference == "" {
			msg.Info("--> Found imported reference to %s", i.Name)
		} else {
			msg.Info("--> Found imported reference to %s at revision %s", i.Name, i.Reference)
		}

		config.Imports = append(config.Imports, i)
	}
}

func guessImportGodep(dir string) ([]*cfg.Dependency, bool) {
	d, err := godep.Parse(dir)
	if err != nil || len(d) == 0 {
		return []*cfg.Dependency{}, false
	}

	return d, true
}

func guessImportGPM(dir string) ([]*cfg.Dependency, bool) {
	d, err := gpm.Parse(dir)
	if err != nil || len(d) == 0 {
		return []*cfg.Dependency{}, false
	}

	return d, true
}

func guessImportGB(dir string) ([]*cfg.Dependency, bool) {
	d, err := gb.Parse(dir)
	if err != nil || len(d) == 0 {
		return []*cfg.Dependency{}, false
	}

	return d, true
}


================================================
FILE: action/debug.go
================================================
package action

import (
	"github.com/Masterminds/glide/msg"
)

// Debug sets the debugging flags across components.
func Debug(on bool) {
	msg.Default.IsDebugging = on
}

// Quiet sets the quiet flags across components.
func Quiet(on bool) {
	msg.Default.Quiet = on
}

// NoColor sets the color flags.
func NoColor(on bool) {
	msg.Default.NoColor = on
}


================================================
FILE: action/doc.go
================================================
// 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.
package action


================================================
FILE: action/ensure.go
================================================
package action

import (
	"io/ioutil"
	"os"
	"os/exec"
	"path"
	"path/filepath"
	"strings"

	"github.com/Masterminds/glide/cfg"
	"github.com/Masterminds/glide/mirrors"
	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
	"github.com/Masterminds/glide/util"
)

// EnsureConfig loads and returns a config file.
//
// Any error will cause an immediate exit, with an error printed to Stderr.
func EnsureConfig() *cfg.Config {
	yamlpath, err := gpath.Glide()
	if err != nil {
		msg.ExitCode(2)
		msg.Die("Failed to find %s file in directory tree: %s", gpath.GlideFile, err)
	}

	yml, err := ioutil.ReadFile(yamlpath)
	if err != nil {
		msg.ExitCode(2)
		msg.Die("Failed to load %s: %s", yamlpath, err)
	}
	conf, err := cfg.ConfigFromYaml(yml)
	if err != nil {
		msg.ExitCode(3)
		msg.Die("Failed to parse %s: %s", yamlpath, err)
	}

	b := filepath.Dir(yamlpath)
	buildContext, err := util.GetBuildContext()
	if err != nil {
		msg.Die("Failed to build an import context while ensuring config: %s", err)
	}
	cwd, err := os.Getwd()
	if err != nil {
		msg.Err("Unable to get the current working directory")
	} else {
		// Determining a package name requires a relative path
		b, err = filepath.Rel(b, cwd)
		if err == nil {
			name := buildContext.PackageName(b)
			if name != conf.Name {
				msg.Warn("The name listed in the config file (%s) does not match the current location (%s)", conf.Name, name)
			}
		} else {
			msg.Warn("Problem finding the config file path (%s) relative to the current directory (%s): %s", b, cwd, err)
		}
	}

	err = mirrors.Load()
	if err != nil {
		msg.Err("Unable to load mirrors: %s", err)
	}

	return conf
}

// EnsureGoVendor ensures that the Go version is correct.
func EnsureGoVendor() {
	// 6l was removed in 1.5, when vendoring was introduced.
	cmd := exec.Command(goExecutable(), "tool", "6l")
	if _, err := cmd.CombinedOutput(); err == nil {
		msg.Warn("You must install the Go 1.5 or greater toolchain to work with Glide.\n")
		os.Exit(1)
	}

	// Check if this is go15, which requires GO15VENDOREXPERIMENT
	// Any release after go15 does not require that env var.
	cmd = exec.Command(goExecutable(), "version")
	if out, err := cmd.CombinedOutput(); err != nil {
		msg.Err("Error getting version: %s.\n", err)
		os.Exit(1)
	} else if strings.HasPrefix(string(out), "go version 1.5") {
		// This works with 1.5 and 1.6.
		cmd = exec.Command(goExecutable(), "env", "GO15VENDOREXPERIMENT")
		if out, err := cmd.CombinedOutput(); err != nil {
			msg.Err("Error looking for $GOVENDOREXPERIMENT: %s.\n", err)
			os.Exit(1)
		} else if strings.TrimSpace(string(out)) != "1" {
			msg.Err("To use Glide, you must set GO15VENDOREXPERIMENT=1")
			os.Exit(1)
		}
	}

	// In the case where vendoring is explicitly disabled, balk.
	if os.Getenv("GO15VENDOREXPERIMENT") == "0" {
		msg.Err("To use Glide, you must set GO15VENDOREXPERIMENT=1")
		os.Exit(1)
	}

	// Verify the setup isn't for the old version of glide. That is, this is
	// no longer assuming the _vendor directory as the GOPATH. Inform of
	// the change.
	if _, err := os.Stat("_vendor/"); err == nil {
		msg.Warn(`Your setup appears to be for the previous version of Glide.
Previously, vendor packages were stored in _vendor/src/ and
_vendor was set as your GOPATH. As of Go 1.5 the go tools
recognize the vendor directory as a location for these
files. Glide has embraced this. Please remove the _vendor
directory or move the _vendor/src/ directory to vendor/.` + "\n")
		os.Exit(1)
	}
}

// EnsureVendorDir ensures that a vendor/ directory is present in the cwd.
func EnsureVendorDir() {
	fi, err := os.Stat(gpath.VendorDir)
	if err != nil {
		msg.Debug("Creating %s", gpath.VendorDir)
		if err := os.MkdirAll(gpath.VendorDir, os.ModeDir|0755); err != nil {
			msg.Die("Could not create %s: %s", gpath.VendorDir, err)
		}
	} else if !fi.IsDir() {
		msg.Die("Vendor is not a directory")
	}
}

// EnsureGopath fails if GOPATH is not set, or if $GOPATH/src is missing.
//
// Otherwise it returns the value of GOPATH.
func EnsureGopath() string {
	gps := gpath.Gopaths()
	if len(gps) == 0 {
		msg.Die("$GOPATH is not set.")
	}

	for _, gp := range gps {
		_, err := os.Stat(path.Join(gp, "src"))
		if err != nil {
			msg.Warn("%s", err)
			continue
		}
		return gp
	}

	msg.Err("Could not find any of %s/src.\n", strings.Join(gps, "/src, "))
	msg.Info("As of Glide 0.5/Go 1.5, this is required.\n")
	msg.Die("Without src, cannot continue.")
	return ""
}

// goExecutable checks for a set environment variable of GLIDE_GO_EXECUTABLE
// for the go executable name. The Google App Engine SDK ships with a python
// wrapper called goapp
//
// Example usage: GLIDE_GO_EXECUTABLE=goapp glide install
func goExecutable() string {
	goExecutable := os.Getenv("GLIDE_GO_EXECUTABLE")
	if len(goExecutable) <= 0 {
		goExecutable = "go"
	}

	return goExecutable
}


================================================
FILE: action/get.go
================================================
package action

import (
	"fmt"
	"path/filepath"
	"strings"

	"github.com/Masterminds/glide/cache"
	"github.com/Masterminds/glide/cfg"
	"github.com/Masterminds/glide/godep"
	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
	"github.com/Masterminds/glide/repo"
	"github.com/Masterminds/glide/util"
	"github.com/Masterminds/semver"
)

// Get fetches one or more dependencies and installs.
//
// This includes resolving dependency resolution and re-generating the lock file.
func Get(names []string, installer *repo.Installer, insecure, skipRecursive, stripVendor, nonInteract, testDeps bool) {
	cache.SystemLock()

	base := gpath.Basepath()
	EnsureGopath()
	EnsureVendorDir()
	conf := EnsureConfig()
	glidefile, err := gpath.Glide()
	if err != nil {
		msg.Die("Could not find Glide file: %s", err)
	}

	// Add the packages to the config.
	if count, err2 := addPkgsToConfig(conf, names, insecure, nonInteract, testDeps); err2 != nil {
		msg.Die("Failed to get new packages: %s", err2)
	} else if count == 0 {
		msg.Warn("Nothing to do")
		return
	}

	// Fetch the new packages. Can't resolve versions via installer.Update if
	// get is called while the vendor/ directory is empty so we checkout
	// everything.
	err = installer.Checkout(conf)
	if err != nil {
		msg.Die("Failed to checkout packages: %s", err)
	}

	// Prior to resolving dependencies we need to start working with a clone
	// of the conf because we'll be making real changes to it.
	confcopy := conf.Clone()

	if !skipRecursive {
		// Get all repos and update them.
		// TODO: Can we streamline this in any way? The reason that we update all
		// of the dependencies is that we need to re-negotiate versions. For example,
		// if an existing dependency has the constraint >1.0 and this new package
		// adds the constraint <2.0, then this may re-resolve the existing dependency
		// to be between 1.0 and 2.0. But changing that dependency may then result
		// in that dependency's dependencies changing... so we sorta do the whole
		// thing to be safe.
		err = installer.Update(confcopy)
		if err != nil {
			msg.Die("Could not update packages: %s", err)
		}
	}

	// Set Reference
	if err := repo.SetReference(confcopy, installer.ResolveTest); err != nil {
		msg.Err("Failed to set references: %s", err)
	}

	err = installer.Export(confcopy)
	if err != nil {
		msg.Die("Unable to export dependencies to vendor directory: %s", err)
	}

	// Write YAML
	if err := conf.WriteFile(glidefile); err != nil {
		msg.Die("Failed to write glide YAML file: %s", err)
	}
	if !skipRecursive {
		// Write lock
		if stripVendor {
			confcopy = godep.RemoveGodepSubpackages(confcopy)
		}
		writeLock(conf, confcopy, base)
	} else {
		msg.Warn("Skipping lockfile generation because full dependency tree is not being calculated")
	}

	if stripVendor {
		msg.Info("Removing nested vendor and Godeps/_workspace directories...")
		err := gpath.StripVendor()
		if err != nil {
			msg.Err("Unable to strip vendor directories: %s", err)
		}
	}
}

func writeLock(conf, confcopy *cfg.Config, base string) {
	hash, err := conf.Hash()
	if err != nil {
		msg.Die("Failed to generate config hash. Unable to generate lock file.")
	}
	lock, err := cfg.NewLockfile(confcopy.Imports, confcopy.DevImports, hash)
	if err != nil {
		msg.Die("Failed to generate lock file: %s", err)
	}
	if err := lock.WriteFile(filepath.Join(base, gpath.LockFile)); err != nil {
		msg.Die("Failed to write glide lock file: %s", err)
	}
}

// addPkgsToConfig adds the given packages to the config file.
//
// Along the way it:
// - ensures that this package is not in the ignore list
// - checks to see if this is already in the dependency list.
// - splits version of of package name and adds the version attribute
// - separates repo from packages
// - sets up insecure repo URLs where necessary
// - generates a list of subpackages
func addPkgsToConfig(conf *cfg.Config, names []string, insecure, nonInteract, testDeps bool) (int, error) {

	if len(names) == 1 {
		msg.Info("Preparing to install %d package.", len(names))
	} else {
		msg.Info("Preparing to install %d packages.", len(names))
	}
	numAdded := 0
	for _, name := range names {
		var version string
		parts := strings.Split(name, "#")
		if len(parts) > 1 {
			name = parts[0]
			version = parts[1]
		}

		msg.Info("Attempting to get package %s", name)

		root, subpkg := util.NormalizeName(name)
		if len(root) == 0 {
			return 0, fmt.Errorf("Package name is required for %q.", name)
		}

		if conf.HasDependency(root) {

			var moved bool
			var dep *cfg.Dependency
			// Move from DevImports to Imports
			if !testDeps && !conf.Imports.Has(root) && conf.DevImports.Has(root) {
				dep = conf.DevImports.Get(root)
				conf.Imports = append(conf.Imports, dep)
				conf.DevImports = conf.DevImports.Remove(root)
				moved = true
				numAdded++
				msg.Info("--> Moving %s from testImport to import", root)
			} else if testDeps && conf.Imports.Has(root) {
				msg.Warn("--> Test dependency %s already listed as import", root)
			}

			// Check if the subpackage is present.
			if subpkg != "" {
				if dep == nil {
					dep = conf.Imports.Get(root)
					if dep == nil && testDeps {
						dep = conf.DevImports.Get(root)
					}
				}
				if dep.HasSubpackage(subpkg) {
					if !moved {
						msg.Warn("--> Package %q is already in glide.yaml. Skipping", name)
					}
				} else {
					dep.Subpackages = append(dep.Subpackages, subpkg)
					msg.Info("--> Adding sub-package %s to existing import %s", subpkg, root)
					numAdded++
				}
			} else if !moved {
				msg.Warn("--> Package %q is already in glide.yaml. Skipping", root)
			}
			continue
		}

		if conf.HasIgnore(root) {
			msg.Warn("--> Package %q is set to be ignored in glide.yaml. Skipping", root)
			continue
		}

		dep := &cfg.Dependency{
			Name: root,
		}

		// When retriving from an insecure location set the repo to the
		// insecure location.
		if insecure {
			dep.Repository = "http://" + root
		}

		if version != "" {
			dep.Reference = version
		} else if !nonInteract {
			getWizard(dep)
		}

		if len(subpkg) > 0 {
			dep.Subpackages = []string{subpkg}
		}

		if dep.Reference != "" {
			msg.Info("--> Adding %s to your configuration with the version %s", dep.Name, dep.Reference)
		} else {
			msg.Info("--> Adding %s to your configuration", dep.Name)
		}

		if testDeps {
			conf.DevImports = append(conf.DevImports, dep)
		} else {
			conf.Imports = append(conf.Imports, dep)
		}
		numAdded++
	}
	return numAdded, nil
}

func getWizard(dep *cfg.Dependency) {
	remote := dep.Remote()

	// Lookup dependency info and store in cache.
	msg.Info("--> Gathering release information for %s", dep.Name)
	wizardFindVersions(dep)

	memlatest := cache.MemLatest(remote)
	if memlatest != "" {
		dres := wizardAskLatest(memlatest, dep)
		if dres {
			dep.Reference = memlatest

			sv, err := semver.NewVersion(dep.Reference)
			if err == nil {
				res := wizardAskRange(sv, dep)
				if res == "m" {
					dep.Reference = "^" + sv.String()
				} else if res == "p" {
					dep.Reference = "~" + sv.String()
				}
			}
		}
	}
}


================================================
FILE: action/get_test.go
================================================
package action

import (
	"io/ioutil"
	"testing"

	"github.com/Masterminds/glide/cfg"
	"github.com/Masterminds/glide/msg"
)

func TestAddPkgsToConfig(t *testing.T) {
	// Route output to discard so it's not displayed with the test output.
	o := msg.Default.Stderr
	msg.Default.Stderr = ioutil.Discard

	conf := new(cfg.Config)
	dep := new(cfg.Dependency)
	dep.Name = "github.com/Masterminds/cookoo"
	dep.Subpackages = append(dep.Subpackages, "convert")
	conf.Imports = append(conf.Imports, dep)

	names := []string{
		"github.com/Masterminds/cookoo/fmt",
		"github.com/Masterminds/semver",
	}

	addPkgsToConfig(conf, names, false, true, false)

	if !conf.HasDependency("github.com/Masterminds/semver") {
		t.Error("addPkgsToConfig failed to add github.com/Masterminds/semver")
	}

	d := conf.Imports.Get("github.com/Masterminds/cookoo")
	found := false
	for _, s := range d.Subpackages {
		if s == "fmt" {
			found = true
		}
	}
	if !found {
		t.Error("addPkgsToConfig failed to add subpackage to existing import")
	}

	// Restore messaging to original location
	msg.Default.Stderr = o
}


================================================
FILE: action/import_gb.go
================================================
package action

import (
	"github.com/Masterminds/glide/cfg"
	"github.com/Masterminds/glide/gb"
	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
)

// ImportGB imports GB dependencies into the present glide config.
func ImportGB(dest string) {
	base := "."
	config := EnsureConfig()
	if !gb.Has(base) {
		msg.Die("There is no GB manifest to import.")
	}
	deps, err := gb.Parse(base)
	if err != nil {
		msg.Die("Failed to extract GB manifest: %s", err)
	}
	appendImports(deps, config)
	writeConfigToFileOrStdout(config, dest)
}

func appendImports(deps []*cfg.Dependency, config *cfg.Config) {
	if len(deps) == 0 {
		msg.Info("No dependencies added.")
		return
	}

	//Append deps to existing dependencies.
	if err := config.AddImport(deps...); err != nil {
		msg.Die("Failed to add imports: %s", err)
	}
}

// writeConfigToFileOrStdout is a convenience function for import utils.
func writeConfigToFileOrStdout(config *cfg.Config, dest string) {
	if dest != "" {
		if err := config.WriteFile(dest); err != nil {
			msg.Die("Failed to write %s: %s", gpath.GlideFile, err)
		}
	} else {
		o, err := config.Marshal()
		if err != nil {
			msg.Die("Error encoding config: %s", err)
		}
		msg.Default.Stdout.Write(o)
	}
}


================================================
FILE: action/import_godep.go
================================================
package action

import (
	"github.com/Masterminds/glide/godep"
	"github.com/Masterminds/glide/msg"
)

// ImportGodep imports a Godep file.
func ImportGodep(dest string) {
	base := "."
	config := EnsureConfig()
	if !godep.Has(base) {
		msg.Die("No Godep data found.")
	}
	deps, err := godep.Parse(base)
	if err != nil {
		msg.Die("Failed to extract Godeps file: %s", err)
	}
	appendImports(deps, config)
	writeConfigToFileOrStdout(config, dest)
}


================================================
FILE: action/import_gom.go
================================================
package action

import (
	"github.com/Masterminds/glide/gom"
	"github.com/Masterminds/glide/msg"
)

// ImportGom imports a Gomfile.
func ImportGom(dest string) {
	base := "."
	config := EnsureConfig()
	if !gom.Has(base) {
		msg.Die("No gom data found.")
	}
	deps, err := gom.Parse(base)
	if err != nil {
		msg.Die("Failed to extract Gomfile: %s", err)
	}
	appendImports(deps, config)
	writeConfigToFileOrStdout(config, dest)
}


================================================
FILE: action/import_gpm.go
================================================
package action

import (
	"github.com/Masterminds/glide/gpm"
	"github.com/Masterminds/glide/msg"
)

// ImportGPM imports a GPM file.
func ImportGPM(dest string) {
	base := "."
	config := EnsureConfig()
	if !gpm.Has(base) {
		msg.Die("No GPM Godeps file found.")
	}
	deps, err := gpm.Parse(base)
	if err != nil {
		msg.Die("Failed to extract GPM Godeps file: %s", err)
	}
	appendImports(deps, config)
	writeConfigToFileOrStdout(config, dest)
}


================================================
FILE: action/init.go
================================================
package action

import (
	gpath "github.com/Masterminds/glide/path"
)

// Init initializes the action subsystem for handling one or more subesequent actions.
func Init(yaml, home string) {
	gpath.GlideFile = yaml
	gpath.SetHome(home)
}


================================================
FILE: action/install.go
================================================
package action

import (
	"path/filepath"

	"github.com/Masterminds/glide/cache"
	"github.com/Masterminds/glide/cfg"
	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
	"github.com/Masterminds/glide/repo"
)

// Install installs a vendor directory based on an existing Glide configuration.
func Install(installer *repo.Installer, stripVendor bool) {
	cache.SystemLock()

	base := "."
	// Ensure GOPATH
	EnsureGopath()
	EnsureVendorDir()
	conf := EnsureConfig()

	// Lockfile exists
	if !gpath.HasLock(base) {
		msg.Info("Lock file (glide.lock) does not exist. Performing update.")
		Update(installer, false, stripVendor)
		return
	}
	// Load lockfile
	lock, err := cfg.ReadLockFile(filepath.Join(base, gpath.LockFile))
	if err != nil {
		msg.Die("Could not load lockfile.")
	}
	// Verify lockfile hasn't changed
	hash, err := conf.Hash()
	if err != nil {
		msg.Die("Could not load lockfile.")
	} else if hash != lock.Hash {
		msg.Warn("Lock file may be out of date. Hash check of YAML failed. You may need to run 'update'")
	}

	// Install
	newConf, err := installer.Install(lock, conf)
	if err != nil {
		msg.Die("Failed to install: %s", err)
	}

	msg.Info("Setting references.")

	// Set reference
	if err := repo.SetReference(newConf, installer.ResolveTest); err != nil {
		msg.Die("Failed to set references: %s (Skip to cleanup)", err)
	}

	err = installer.Export(newConf)
	if err != nil {
		msg.Die("Unable to export dependencies to vendor directory: %s", err)
	}

	if stripVendor {
		msg.Info("Removing nested vendor and Godeps/_workspace directories...")
		err := gpath.StripVendor()
		if err != nil {
			msg.Err("Unable to strip vendor directories: %s", err)
		}
	}
}


================================================
FILE: action/list.go
================================================
package action

import (
	"encoding/json"
	"path/filepath"
	"sort"

	"github.com/Masterminds/glide/dependency"
	"github.com/Masterminds/glide/msg"
)

// 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
//  - format (string): The format to output (text, json, json-pretty)
func List(basedir string, deep bool, format string) {
	basedir, err := filepath.Abs(basedir)
	if err != nil {
		msg.Die("Could not read directory: %s", err)
	}

	r, err := dependency.NewResolver(basedir)
	if err != nil {
		msg.Die("Could not create a resolver: %s", err)
	}
	h := &dependency.DefaultMissingPackageHandler{Missing: []string{}, Gopath: []string{}, Prefix: "vendor"}
	r.Handler = h

	localPkgs, _, err := r.ResolveLocal(deep)
	if err != nil {
		msg.Die("Error listing dependencies: %s", err)
	}
	sort.Strings(localPkgs)
	installed := make([]string, len(localPkgs))
	for i, pkg := range localPkgs {
		relPkg, err := filepath.Rel(basedir, pkg)
		if err != nil {
			// msg.Warn("Failed to Rel path: %s", err)
			relPkg = pkg
		}
		installed[i] = relPkg
	}
	l := PackageList{
		Installed: installed,
		Missing:   h.Missing,
		Gopath:    h.Gopath,
	}

	outputList(l, format)
}

// PackageList contains the packages being used by their location
type PackageList struct {
	Installed []string `json:"installed"`
	Missing   []string `json:"missing"`
	Gopath    []string `json:"gopath"`
}

const (
	textFormat       = "text"
	jsonFormat       = "json"
	jsonPrettyFormat = "json-pretty"
)

func outputList(l PackageList, format string) {
	switch format {
	case textFormat:
		msg.Puts("INSTALLED packages:")
		for _, pkg := range l.Installed {
			msg.Puts("\t%s", pkg)
		}

		if len(l.Missing) > 0 {
			msg.Puts("\nMISSING packages:")
			for _, pkg := range l.Missing {
				msg.Puts("\t%s", pkg)
			}
		}
		if len(l.Gopath) > 0 {
			msg.Puts("\nGOPATH packages:")
			for _, pkg := range l.Gopath {
				msg.Puts("\t%s", pkg)
			}
		}
	case jsonFormat:
		json.NewEncoder(msg.Default.Stdout).Encode(l)
	case jsonPrettyFormat:
		b, err := json.MarshalIndent(l, "", "  ")
		if err != nil {
			msg.Die("could not unmarshal package list: %s", err)
		}
		msg.Puts(string(b))
	default:
		msg.Die("invalid output format: must be one of: json|json-pretty|text")
	}
}


================================================
FILE: action/list_test.go
================================================
package action

import (
	"bytes"
	"encoding/json"
	"testing"

	"github.com/Masterminds/glide/msg"
)

func TestList(t *testing.T) {
	msg.Default.PanicOnDie = true
	old := msg.Default.Stdout
	defer func() {
		msg.Default.Stdout = old
	}()

	var buf bytes.Buffer
	msg.Default.Stdout = &buf
	List("../", false, "text")
	if buf.Len() < 5 {
		t.Error("Expected some data to be found.")
	}

	var buf2 bytes.Buffer
	msg.Default.Stdout = &buf2
	List("../", false, "json")
	j := buf2.Bytes()
	var o PackageList
	err := json.Unmarshal(j, &o)
	if err != nil {
		t.Errorf("Error unmarshaling json list: %s", err)
	}
	if len(o.Installed) == 0 {
		t.Error("No packages found on json list")
	}

	var buf3 bytes.Buffer
	msg.Default.Stdout = &buf3
	List("../", false, "json-pretty")
	j = buf3.Bytes()
	var o2 PackageList
	err = json.Unmarshal(j, &o2)
	if err != nil {
		t.Errorf("Error unmarshaling json-pretty list: %s", err)
	}
	if len(o2.Installed) == 0 {
		t.Error("No packages found on json-pretty list")
	}
}


================================================
FILE: action/mirrors.go
================================================
package action

import (
	"os"
	"path/filepath"

	"github.com/Masterminds/glide/mirrors"
	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
)

// MirrorsList displays a list of currently setup mirrors.
func MirrorsList() error {
	home := gpath.Home()

	op := filepath.Join(home, "mirrors.yaml")

	if _, err := os.Stat(op); os.IsNotExist(err) {
		msg.Info("No mirrors exist. No mirrors.yaml file not found")
		return nil
	}

	ov, err := mirrors.ReadMirrorsFile(op)
	if err != nil {
		msg.Die("Unable to read mirrors.yaml file: %s", err)
	}

	if len(ov.Repos) == 0 {
		msg.Info("No mirrors found")
		return nil
	}

	msg.Info("Mirrors...")
	for _, r := range ov.Repos {
		if r.Vcs == "" {
			msg.Info("--> %s replaced by %s", r.Original, r.Repo)
		} else {
			msg.Info("--> %s replaced by %s (%s)", r.Original, r.Repo, r.Vcs)
		}
	}

	return nil
}

// MirrorsSet sets a mirror to use
func MirrorsSet(o, r, v string) error {
	if o == "" || r == "" {
		msg.Err("Both the original and mirror values are required")
		return nil
	}

	home := gpath.Home()

	op := filepath.Join(home, "mirrors.yaml")

	var ov *mirrors.Mirrors
	if _, err := os.Stat(op); os.IsNotExist(err) {
		msg.Info("No mirrors.yaml file exists. Creating new one")
		ov = &mirrors.Mirrors{
			Repos: make(mirrors.MirrorRepos, 0),
		}
	} else {
		ov, err = mirrors.ReadMirrorsFile(op)
		if err != nil {
			msg.Die("Error reading existing mirrors.yaml file: %s", err)
		}
	}

	found := false
	for i, re := range ov.Repos {
		if re.Original == o {
			found = true
			msg.Info("%s found in mirrors. Replacing with new settings", o)
			ov.Repos[i].Repo = r
			ov.Repos[i].Vcs = v
		}
	}

	if !found {
		nr := &mirrors.MirrorRepo{
			Original: o,
			Repo:     r,
			Vcs:      v,
		}
		ov.Repos = append(ov.Repos, nr)
	}

	msg.Info("%s being set to %s", o, r)

	err := ov.WriteFile(op)
	if err != nil {
		msg.Err("Error writing mirrors.yaml file: %s", err)
	} else {
		msg.Info("mirrors.yaml written with changes")
	}

	return nil
}

// MirrorsRemove removes a mirrors setting
func MirrorsRemove(k string) error {
	if k == "" {
		msg.Err("The mirror to remove is required")
		return nil
	}

	home := gpath.Home()

	op := filepath.Join(home, "mirrors.yaml")

	if _, err := os.Stat(op); os.IsNotExist(err) {
		msg.Err("mirrors.yaml file not found")
		return nil
	}

	ov, err := mirrors.ReadMirrorsFile(op)
	if err != nil {
		msg.Die("Unable to read mirrors.yaml file: %s", err)
	}

	var nre mirrors.MirrorRepos
	var found bool
	for _, re := range ov.Repos {
		if re.Original != k {
			nre = append(nre, re)
		} else {
			found = true
		}
	}

	if !found {
		msg.Warn("%s was not found in mirrors", k)
	} else {
		msg.Info("%s was removed from mirrors", k)
		ov.Repos = nre

		err = ov.WriteFile(op)
		if err != nil {
			msg.Err("Error writing mirrors.yaml file: %s", err)
		} else {
			msg.Info("mirrors.yaml written with changes")
		}
	}

	return nil
}


================================================
FILE: action/name.go
================================================
package action

import (
	"github.com/Masterminds/glide/msg"
)

// Name prints the name of the package, according to the glide.yaml file.
func Name() {
	conf := EnsureConfig()
	msg.Puts(conf.Name)
}


================================================
FILE: action/name_test.go
================================================
package action

import (
	"bytes"
	"os"
	"testing"

	"github.com/Masterminds/glide/msg"
)

func TestName(t *testing.T) {
	var buf bytes.Buffer
	msg.Default.PanicOnDie = true
	ostdout := msg.Default.Stdout
	msg.Default.Stdout = &buf
	wd, _ := os.Getwd()
	if err := os.Chdir("../testdata/name"); err != nil {
		t.Errorf("Failed to change directory: %s", err)
	}
	Name()
	if buf.String() != "technosophos.com/x/foo\n" {
		t.Errorf("Unexpectedly got name %q", buf.String())
	}
	msg.Default.Stdout = ostdout
	os.Chdir(wd)
}


================================================
FILE: action/no_vendor.go
================================================
package action

import (
	"os"
	"path/filepath"
	"strings"

	"github.com/Masterminds/glide/msg"
)

// 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 NoVendor(path string, onlyGo, suffix bool) {
	// This is responsible for printing the results of noVend.
	paths, err := noVend(path, onlyGo, suffix)
	if err != nil {
		msg.Err("Failed to walk file tree: %s", err)
		msg.Warn("FIXME: NoVendor should exit with non-zero exit code.")
		return
	}

	for _, p := range paths {
		msg.Puts(p)
	}
}

// noVend takes a directory and returns a list of Go-like files or directories,
// provided the directory is not a vendor directory.
//
// If onlyGo is true, this will filter out all directories that do not contain
// ".go" files.
//
// TODO: Should we move this to its own package?
func noVend(path string, onlyGo, suffix bool) ([]string, error) {

	info, err := os.Stat(path)
	if err != nil {
		return []string{}, err
	}

	if !info.IsDir() {
		return []string{path}, nil
	}

	res := []string{}
	f, err := os.Open(path)
	if err != nil {
		return res, err
	}

	fis, err := f.Readdir(0)
	if err != nil {
		return res, err
	}

	cur := false

	for _, fi := range fis {
		if exclude(fi) {
			continue
		}

		full := filepath.Join(path, fi.Name())
		if fi.IsDir() && !isVend(fi) {
			p := "./" + full + "/..."
			res = append(res, p)
		} else if !fi.IsDir() && isGoish(fi) {
			//res = append(res, full)
			cur = true
		}
	}

	// Filter out directories that do not contain Go code
	if onlyGo {
		res = hasGoSource(res, suffix)
	}

	if cur {
		res = append(res, ".")
	}

	return res, nil
}

// hasGoSource returns a list of directories that contain Go source.
func hasGoSource(dirs []string, suffix bool) []string {
	suf := "/"
	if suffix {
		suf = "/..."
	}
	buf := []string{}
	for _, d := range dirs {
		d := filepath.Dir(d)
		found := false
		walker := func(p string, fi os.FileInfo, err error) error {
			// Dumb optimization
			if found {
				return nil
			}

			// If the file ends with .go, report a match.
			if strings.ToLower(filepath.Ext(p)) == ".go" {
				found = true
			}

			return nil
		}
		filepath.Walk(d, walker)

		if found {
			buf = append(buf, "./"+d+suf)
		}
	}
	return buf
}

// isVend returns true of this directory is a vendor directory.
//
// TODO: Should we return true for Godeps directory?
func isVend(fi os.FileInfo) bool {
	return fi.Name() == "vendor"
}

// exclude returns true if the directory should be excluded by Go toolchain tools.
//
// Examples: directories prefixed with '.' or '_'.
func exclude(fi os.FileInfo) bool {
	if strings.HasPrefix(fi.Name(), "_") {
		return true
	}
	if strings.HasPrefix(fi.Name(), ".") {
		return true
	}
	return false
}

// isGoish returns true if the file appears to be Go source.
func isGoish(fi os.FileInfo) bool {
	return filepath.Ext(fi.Name()) == ".go"
}


================================================
FILE: action/no_vendor_test.go
================================================
package action

import (
	"testing"

	"github.com/Masterminds/glide/msg"
)

func TestNoVendor(t *testing.T) {
	msg.Default.PanicOnDie = true
	NoVendor("../testdata/nv", false, false)
}


================================================
FILE: action/plugin.go
================================================
package action

import (
	"os"
	"os/exec"

	"github.com/Masterminds/glide/msg"
)

// 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.
func Plugin(command string, args []string) {

	cwd, err := os.Getwd()
	if err != nil {
		msg.ExitCode(99)
		msg.Die("Could not get working directory: %s", err)
	}

	cmd := "glide-" + command
	var fullcmd string
	if fullcmd, err = exec.LookPath(cmd); err != nil {
		fullcmd = cwd + "/" + cmd
		if _, err := os.Stat(fullcmd); err != nil {
			msg.ExitCode(99)
			msg.Die("Command %s does not exist.", cmd)
		}
	}

	// Turning os.Args first argument from `glide` to `glide-command`
	args[0] = cmd
	// Removing the first argument (command)
	removed := false
	for i, v := range args {
		if removed == false && v == command {
			args = append(args[:i], args[i+1:]...)
			removed = true
		}
	}
	pa := os.ProcAttr{
		Files: []*os.File{os.Stdin, os.Stdout, os.Stderr},
		Dir:   cwd,
	}

	msg.Debug("Delegating to plugin %s (%v)\n", fullcmd, args)

	proc, err := os.StartProcess(fullcmd, args, &pa)
	if err != nil {
		msg.Err("Failed to execute %s: %s", cmd, err)
		os.Exit(98)
	}

	if _, err := proc.Wait(); err != nil {
		msg.Err(err.Error())
		os.Exit(1)
	}
}


================================================
FILE: action/plugin_test.go
================================================
package action

import (
	"os"
	"runtime"
	"testing"

	"github.com/Masterminds/glide/msg"
)

func TestPlugin(t *testing.T) {
	wd, _ := os.Getwd()
	os.Chdir("../testdata/plugin")
	msg.Default.PanicOnDie = true
	var cmd string

	// Windows scripts for testing (batch) are different from shells scripts.
	// Making sure the plugin works in both bases.
	if runtime.GOOS == "windows" {
		cmd = "hello-win"
	} else {
		cmd = "hello"
	}
	args := []string{"a", "b"}
	// FIXME: Trapping the panic is the nice thing to do.
	Plugin(cmd, args)
	os.Chdir(wd)
}


================================================
FILE: action/project_info.go
================================================
package action

import (
	"bytes"

	"github.com/Masterminds/glide/msg"
)

// Info prints information about a project based on a passed in format.
func Info(format string) {
	conf := EnsureConfig()
	var buffer bytes.Buffer
	varInit := false
	for _, varfmt := range format {
		if varInit {
			switch varfmt {
			case 'n':
				buffer.WriteString(conf.Name)
			case 'd':
				buffer.WriteString(conf.Description)
			case 'h':
				buffer.WriteString(conf.Home)
			case 'l':
				buffer.WriteString(conf.License)
			default:
				msg.Die("Invalid format %s", string(varfmt))
			}
		} else {
			switch varfmt {
			case '%':
				varInit = true
				continue
			default:
				buffer.WriteString(string(varfmt))
			}
		}
		varInit = false
	}
	msg.Puts(buffer.String())
}


================================================
FILE: action/rebuild.go
================================================
package action

import (
	"os"
	"os/exec"
	"path"
	"path/filepath"
	"strings"

	"github.com/Masterminds/glide/cfg"
	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
)

// Rebuild rebuilds '.a' files for a project.
//
// Prior to Go 1.4, this could substantially reduce time on incremental compiles.
// It remains to be seen whether this is tremendously beneficial to modern Go
// programs.
func Rebuild() {
	msg.Warn("The rebuild command is deprecated and will be removed in a future version")
	msg.Warn("Use the go install command instead")
	conf := EnsureConfig()
	vpath, err := gpath.Vendor()
	if err != nil {
		msg.Die("Could not get vendor path: %s", err)
	}

	msg.Info("Building dependencies.\n")

	if len(conf.Imports) == 0 {
		msg.Info("No dependencies found. Nothing built.\n")
		return
	}

	for _, dep := range conf.Imports {
		if err := buildDep(dep, vpath); err != nil {
			msg.Warn("Failed to build %s: %s\n", dep.Name, err)
		}
	}
}

func buildDep(dep *cfg.Dependency, vpath string) error {
	if len(dep.Subpackages) == 0 {
		buildPath(dep.Name)
	}

	for _, pkg := range dep.Subpackages {
		if pkg == "**" || pkg == "..." {
			//Info("Building all packages in %s\n", dep.Name)
			buildPath(path.Join(dep.Name, "..."))
		} else {
			paths, err := resolvePackages(vpath, dep.Name, pkg)
			if err != nil {
				msg.Warn("Error resolving packages: %s", err)
			}
			buildPaths(paths)
		}
	}

	return nil
}

func resolvePackages(vpath, pkg, subpkg string) ([]string, error) {
	sdir, _ := os.Getwd()
	if err := os.Chdir(filepath.Join(vpath, pkg, subpkg)); err != nil {
		return []string{}, err
	}
	defer os.Chdir(sdir)
	p, err := filepath.Glob(path.Join(vpath, pkg, subpkg))
	if err != nil {
		return []string{}, err
	}
	for k, v := range p {
		nv := strings.TrimPrefix(v, vpath)
		p[k] = strings.TrimPrefix(nv, string(filepath.Separator))
	}
	return p, nil
}

func buildPaths(paths []string) error {
	for _, path := range paths {
		if err := buildPath(path); err != nil {
			return err
		}
	}

	return nil
}

func buildPath(path string) error {
	msg.Info("Running go build %s\n", path)
	// . in a filepath.Join is removed so it needs to be prepended separately.
	p := "." + string(filepath.Separator) + filepath.Join("vendor", path)
	out, err := exec.Command(goExecutable(), "install", p).CombinedOutput()
	if err != nil {
		msg.Warn("Failed to run 'go install' for %s: %s", path, string(out))
	}
	return err
}


================================================
FILE: action/rebuild_test.go
================================================
package action

import (
	"os"
	"testing"

	"github.com/Masterminds/glide/msg"
)

func TestRebuild(t *testing.T) {
	msg.Default.PanicOnDie = true
	wd, _ := os.Getwd()
	if err := os.Chdir("../testdata/rebuild"); err != nil {
		t.Errorf("Could not change dir: %s (%s)", err, wd)
	}
	Rebuild()
	os.Chdir(wd)
}


================================================
FILE: action/remove.go
================================================
package action

import (
	"github.com/Masterminds/glide/cache"
	"github.com/Masterminds/glide/cfg"
	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
	"github.com/Masterminds/glide/repo"
)

// Remove removes a dependncy from the configuration.
func Remove(packages []string, inst *repo.Installer) {
	cache.SystemLock()
	base := gpath.Basepath()
	EnsureGopath()
	EnsureVendorDir()
	conf := EnsureConfig()
	glidefile, err := gpath.Glide()
	if err != nil {
		msg.Die("Could not find Glide file: %s", err)
	}

	msg.Info("Preparing to remove %d packages.", len(packages))
	conf.Imports = rmDeps(packages, conf.Imports)
	conf.DevImports = rmDeps(packages, conf.DevImports)

	// Copy used to generate locks.
	confcopy := conf.Clone()

	//confcopy.Imports = inst.List(confcopy)

	if err := repo.SetReference(confcopy, inst.ResolveTest); err != nil {
		msg.Err("Failed to set references: %s", err)
	}

	err = inst.Export(confcopy)
	if err != nil {
		msg.Die("Unable to export dependencies to vendor directory: %s", err)
	}

	// Write glide.yaml
	if err := conf.WriteFile(glidefile); err != nil {
		msg.Die("Failed to write glide YAML file: %s", err)
	}

	// Write glide lock
	writeLock(conf, confcopy, base)
}

// rmDeps returns a list of dependencies that do not contain the given pkgs.
//
// It generates neither an error nor a warning for a pkg that does not exist
// in the list of deps.
func rmDeps(pkgs []string, deps []*cfg.Dependency) []*cfg.Dependency {
	res := []*cfg.Dependency{}
	for _, d := range deps {
		rem := false
		for _, p := range pkgs {
			if p == d.Name {
				rem = true
			}
		}
		if !rem {
			res = append(res, d)
		}
	}
	return res
}


================================================
FILE: action/tree.go
================================================
package action

import (
	"container/list"
	"os"

	"github.com/Masterminds/glide/msg"
	"github.com/Masterminds/glide/tree"
	"github.com/Masterminds/glide/util"
)

// Tree prints a tree representing dependencies.
func Tree(basedir string, showcore bool) {
	msg.Warn("The tree command is deprecated and will be removed in a future version")
	buildContext, err := util.GetBuildContext()
	if err != nil {
		msg.Die("Failed to get a build context: %s", err)
	}
	myName := buildContext.PackageName(basedir)

	if basedir == "." {
		var err error
		basedir, err = os.Getwd()
		if err != nil {
			msg.Die("Could not get working directory")
		}
	}

	msg.Puts(myName)
	l := list.New()
	l.PushBack(myName)
	tree.Display(buildContext, basedir, myName, 1, showcore, l)
}


================================================
FILE: action/update.go
================================================
package action

import (
	"io/ioutil"
	"path/filepath"

	"github.com/Masterminds/glide/cache"
	"github.com/Masterminds/glide/cfg"
	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
	"github.com/Masterminds/glide/repo"
)

// Update updates repos and the lock file from the main glide yaml.
func Update(installer *repo.Installer, skipRecursive, stripVendor bool) {
	cache.SystemLock()

	base := "."
	EnsureGopath()
	EnsureVendorDir()
	conf := EnsureConfig()

	// Try to check out the initial dependencies.
	if err := installer.Checkout(conf); err != nil {
		msg.Die("Failed to do initial checkout of config: %s", err)
	}

	// Set the versions for the initial dependencies so that resolved dependencies
	// are rooted in the correct version of the base.
	if err := repo.SetReference(conf, installer.ResolveTest); err != nil {
		msg.Die("Failed to set initial config references: %s", err)
	}

	// Prior to resolving dependencies we need to start working with a clone
	// of the conf because we'll be making real changes to it.
	confcopy := conf.Clone()

	if !skipRecursive {
		// Get all repos and update them.
		err := installer.Update(confcopy)
		if err != nil {
			msg.Die("Could not update packages: %s", err)
		}

		// Set references. There may be no remaining references to set since the
		// installer set them as it went to make sure it parsed the right imports
		// from the right version of the package.
		msg.Info("Setting references for remaining imports")
		if err := repo.SetReference(confcopy, installer.ResolveTest); err != nil {
			msg.Err("Failed to set references: %s (Skip to cleanup)", err)
		}
	}

	err := installer.Export(confcopy)
	if err != nil {
		msg.Die("Unable to export dependencies to vendor directory: %s", err)
	}

	// Write glide.yaml (Why? Godeps/GPM/GB?)
	// I think we don't need to write a new Glide file because update should not
	// change anything important. It will just generate information about
	// transative dependencies, all of which belongs exclusively in the lock
	// file, not the glide.yaml file.
	// TODO(mattfarina): Detect when a new dependency has been added or removed
	// from the project. A removed dependency should warn and an added dependency
	// should be added to the glide.yaml file. See issue #193.

	if !skipRecursive {
		// Write lock
		hash, err := conf.Hash()
		if err != nil {
			msg.Die("Failed to generate config hash. Unable to generate lock file.")
		}
		lock, err := cfg.NewLockfile(confcopy.Imports, confcopy.DevImports, hash)
		if err != nil {
			msg.Die("Failed to generate lock file: %s", err)
		}
		wl := true
		if gpath.HasLock(base) {
			yml, err := ioutil.ReadFile(filepath.Join(base, gpath.LockFile))
			if err == nil {
				l2, err := cfg.LockfileFromYaml(yml)
				if err == nil {
					f1, err := l2.Fingerprint()
					f2, err2 := lock.Fingerprint()
					if err == nil && err2 == nil && f1 == f2 {
						wl = false
					}
				}
			}
		}
		if wl {
			if err := lock.WriteFile(filepath.Join(base, gpath.LockFile)); err != nil {
				msg.Err("Could not write lock file to %s: %s", base, err)
				return
			}
		} else {
			msg.Info("Versions did not change. Skipping glide.lock update.")
		}

		msg.Info("Project relies on %d dependencies.", len(confcopy.Imports))
	} else {
		msg.Warn("Skipping lockfile generation because full dependency tree is not being calculated")
	}

	if stripVendor {
		msg.Info("Removing nested vendor and Godeps/_workspace directories...")
		err := gpath.StripVendor()
		if err != nil {
			msg.Err("Unable to strip vendor directories: %s", err)
		}
	}
}


================================================
FILE: appveyor.yml
================================================

version: build-{build}.{branch}

clone_folder: C:\gopath\src\github.com\Masterminds\glide
shallow_clone: true

environment:
  GOPATH: C:\gopath

platform:
  - x64

build: off

install:
  - go version
  - go env

test_script:
  - go test -v . ./gb ./path ./action ./tree ./util ./godep ./godep/strip ./gpm ./cfg ./dependency ./importer ./msg ./repo ./mirrors

deploy: off


================================================
FILE: cache/cache.go
================================================
// Package cache provides an interface for interfacing with the Glide local cache
//
// Glide has a local cache of metadata and repositories similar to the GOPATH.
// To store the cache Glide creates a .glide directory with a cache subdirectory.
// This is usually in the users home directory unless there is no accessible
// home directory in which case the .glide directory is in the root of the
// repository.
//
// To get the cache location use the `cache.Location()` function. This will
// return the proper base location in your environment.
//
// Within the cache directory there are two subdirectories. They are the src
// and info directories. The src directory contains version control checkouts
// of the packages. The info direcory contains metadata. The metadata maps to
// the RepoInfo struct. Both stores are happed to keys.
//
// Using the `cache.Key()` function you can get a key for a repo. Pass in a
// location such as `https://github.com/foo/bar` or `git@example.com:foo.git`
// and a key will be returned that can be used for caching operations.
//
// Note, the caching is based on repo rather than package. This is important
// for a couple reasons.
//
// 1. Forks or package replacements are supported in Glide. Where a different
//    repo maps to a package.
// 2. Permissions enable different access. For example `https://example.com/foo.git`
//    and `git@example.com:foo.git` may have access to different branches or tags.
package cache

import (
	"encoding/json"
	"errors"
	"io/ioutil"
	"net/url"
	"os"
	"path/filepath"
	"regexp"
	"strings"
	"sync"
	"time"

	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
)

// Enabled sets if the cache is globally enabled. Defaults to true.
var Enabled = true

// ErrCacheDisabled is returned with the cache is disabled.
var ErrCacheDisabled = errors.New("Cache disabled")

var isSetup bool

var setupMutex sync.Mutex

// Setup creates the cache location.
func Setup() {
	setupMutex.Lock()
	defer setupMutex.Unlock()

	if isSetup {
		return
	}
	msg.Debug("Setting up the cache directory")
	pths := []string{
		"cache",
		filepath.Join("cache", "src"),
		filepath.Join("cache", "info"),
	}

	for _, l := range pths {
		err := os.MkdirAll(filepath.Join(gpath.Home(), l), 0755)
		if err != nil {
			msg.Die("Cache directory unavailable: %s", err)
		}
	}

	isSetup = true
}

// SetupReset resets if setup has been completed. The next time setup is run
// it will attempt a full setup.
func SetupReset() {
	isSetup = false
}

// Location returns the location of the cache.
func Location() string {
	p := filepath.Join(gpath.Home(), "cache")
	Setup()

	return p
}

// scpSyntaxRe matches the SCP-like addresses used to access repos over SSH.
var scpSyntaxRe = regexp.MustCompile(`^([a-zA-Z0-9_]+)@([a-zA-Z0-9._-]+):(.*)$`)

// Key generates a cache key based on a url or scp string. The key is file
// system safe.
func Key(repo string) (string, error) {

	var u *url.URL
	var err error
	var strip bool
	if m := scpSyntaxRe.FindStringSubmatch(repo); m != nil {
		// Match SCP-like syntax and convert it to a URL.
		// Eg, "git@github.com:user/repo" becomes
		// "ssh://git@github.com/user/repo".
		u = &url.URL{
			Scheme: "ssh",
			User:   url.User(m[1]),
			Host:   m[2],
			Path:   "/" + m[3],
		}
		strip = true
	} else {
		u, err = url.Parse(repo)
		if err != nil {
			return "", err
		}
	}

	if strip {
		u.Scheme = ""
	}

	var key string
	if u.Scheme != "" {
		key = u.Scheme + "-"
	}
	if u.User != nil && u.User.Username() != "" {
		key = key + u.User.Username() + "-"
	}
	key = key + u.Host
	if u.Path != "" {
		key = key + strings.Replace(u.Path, "/", "-", -1)
	}

	key = strings.Replace(key, ":", "-", -1)

	return key, nil
}

// RepoInfo holds information about a repo.
type RepoInfo struct {
	DefaultBranch string `json:"default-branch"`
	LastUpdate    string `json:"last-update"`
}

// SaveRepoData stores data about a repo in the Glide cache
func SaveRepoData(key string, data RepoInfo) error {
	if !Enabled {
		return ErrCacheDisabled
	}
	location := Location()
	data.LastUpdate = time.Now().String()
	d, err := json.Marshal(data)
	if err != nil {
		return err
	}

	pp := filepath.Join(location, "info")
	err = os.MkdirAll(pp, 0755)
	if err != nil {
		return err
	}

	p := filepath.Join(pp, key+".json")
	f, err := os.Create(p)
	if err != nil {
		return err
	}
	defer f.Close()

	_, err = f.Write(d)
	return err
}

// RepoData retrieves cached information about a repo.
func RepoData(key string) (*RepoInfo, error) {
	if !Enabled {
		return &RepoInfo{}, ErrCacheDisabled
	}
	location := Location()
	c := &RepoInfo{}
	p := filepath.Join(location, "info", key+".json")
	f, err := ioutil.ReadFile(p)
	if err != nil {
		return &RepoInfo{}, err
	}
	err = json.Unmarshal(f, c)
	if err != nil {
		return &RepoInfo{}, err
	}
	return c, nil
}

var lockSync sync.Mutex

var lockData = make(map[string]*sync.Mutex)

// Lock locks a particular key name
func Lock(name string) {
	lockSync.Lock()
	m, ok := lockData[name]
	if !ok {
		m = &sync.Mutex{}
		lockData[name] = m
	}
	lockSync.Unlock()
	msg.Debug("Locking %s", name)
	m.Lock()
}

// Unlock unlocks a particular key name
func Unlock(name string) {
	msg.Debug("Unlocking %s", name)
	lockSync.Lock()
	if m, ok := lockData[name]; ok {
		m.Unlock()
	}

	lockSync.Unlock()
}


================================================
FILE: cache/cache_test.go
================================================
package cache

import "testing"

func TestKey(t *testing.T) {
	tests := map[string]string{
		"https://github.com/foo/bar":     "https-github.com-foo-bar",
		"git@github.com:foo/bar":         "git-github.com-foo-bar",
		"https://github.com:123/foo/bar": "https-github.com-123-foo-bar",
	}

	for k, v := range tests {
		key, err := Key(k)
		if err != nil {
			t.Errorf("Cache key generation err: %s", err)
			continue
		}
		if key != v {
			t.Errorf("Expected cache key %s for %s but got %s", v, k, key)
		}
	}
}


================================================
FILE: cache/global_lock.go
================================================
package cache

import (
	"encoding/json"
	"io/ioutil"
	"os"
	"os/signal"
	"path/filepath"
	"time"

	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
)

var isStarted bool

// If the global cache lock file should be written
var shouldWriteLock = true

// SystemLock starts a system rather than application lock. This way multiple
// app instances don't cause race conditions when working in the cache.
func SystemLock() error {
	if isStarted {
		return nil
	}
	err := waitOnLock()
	if err != nil {
		return err
	}
	err = startLock()
	isStarted = true
	return err
}

// SystemUnlock removes the system wide Glide cache lock.
func SystemUnlock() {
	lockdone <- struct{}{}
	os.Remove(lockFileName)
}

var lockdone = make(chan struct{}, 1)

type lockdata struct {
	Comment string `json:"comment"`
	Pid     int    `json:"pid"`
	Time    string `json:"time"`
}

var lockFileName = filepath.Join(gpath.Home(), "lock.json")

// Write a lock for now.
func writeLock() error {

	// If the lock should not be written exit immediately. This happens in cases
	// where shutdown/clean is happening.
	if !shouldWriteLock {
		return nil
	}

	ld := &lockdata{
		Comment: "File managed by Glide (https://glide.sh)",
		Pid:     os.Getpid(),
		Time:    time.Now().Format(time.RFC3339Nano),
	}

	out, err := json.Marshal(ld)
	if err != nil {
		return err
	}
	err = ioutil.WriteFile(lockFileName, out, 0755)
	return err
}

func startLock() error {
	err := writeLock()
	if err != nil {
		return err
	}

	go func() {
		for {
			select {
			case <-lockdone:
				return
			default:
				time.Sleep(10 * time.Second)
				err := writeLock()
				if err != nil {
					msg.Die("Error using Glide lock: %s", err)
				}
			}
		}
	}()

	// Capture ctrl-c or other interruptions then clean up the global lock.
	ch := make(chan os.Signal)
	signal.Notify(ch, os.Interrupt, os.Kill)
	go func(cc <-chan os.Signal) {
		s := <-cc
		shouldWriteLock = false
		SystemUnlock()

		// Exiting with the expected exit codes when we can.
		if s == os.Interrupt {
			os.Exit(130)
		} else if s == os.Kill {
			os.Exit(137)
		} else {
			os.Exit(1)
		}
	}(ch)

	return nil
}

func waitOnLock() error {
	var announced bool
	for {
		fi, err := os.Stat(lockFileName)
		if err != nil && os.IsNotExist(err) {
			return nil
		} else if err != nil {
			return err
		}

		diff := time.Now().Sub(fi.ModTime())
		if diff.Seconds() > 15 {
			return nil
		}

		if !announced {
			announced = true
			msg.Info("Waiting on Glide global cache access")
		}

		// Check on the lock file every second.
		time.Sleep(time.Second)
	}
}


================================================
FILE: cache/memory.go
================================================
package cache

import (
	"sync"

	"github.com/Masterminds/glide/msg"
	"github.com/Masterminds/semver"
)

// Provide an in memory cache of imported project information.

var defaultMemCache = newMemCache()

// MemPut put a version into the in memory cache for a name.
// This will silently ignore non-semver and make sure the latest
// is stored.
func MemPut(name, version string) {
	defaultMemCache.put(name, version)
}

// MemTouched returns true if the cache was touched for a name.
func MemTouched(name string) bool {
	return defaultMemCache.touched(name)
}

// MemTouch notes if a name has been looked at.
func MemTouch(name string) {
	defaultMemCache.touch(name)
}

// MemLatest returns the latest, that is most recent, semver release. This
// may be a blank string if no put value
func MemLatest(name string) string {
	return defaultMemCache.getLatest(name)
}

// MemSetCurrent is used to set the current version in use.
func MemSetCurrent(name, version string) {
	defaultMemCache.setCurrent(name, version)
}

// MemCurrent is used to get the current version in use.
func MemCurrent(name string) string {
	return defaultMemCache.current(name)
}

// An in memory cache.
type memCache struct {
	sync.RWMutex
	latest   map[string]string
	t        map[string]bool
	versions map[string][]string
	c        map[string]string
}

func newMemCache() *memCache {
	return &memCache{
		latest:   make(map[string]string),
		t:        make(map[string]bool),
		versions: make(map[string][]string),
		c:        make(map[string]string),
	}
}

func (m *memCache) setCurrent(name, version string) {
	m.Lock()
	defer m.Unlock()

	if m.c[name] == "" {
		m.c[name] = version
	} else {
		// If we already have a version try to see if the new or old one is
		// semver and use that one.
		_, err := semver.NewVersion(m.c[name])
		if err != nil {
			_, err2 := semver.NewVersion(version)
			if err2 == nil {
				m.c[name] = version
			}
		}
	}
}

func (m *memCache) current(name string) string {
	m.RLock()
	defer m.RUnlock()
	return m.c[name]
}

func (m *memCache) put(name, version string) {
	m.Lock()
	defer m.Unlock()
	m.t[name] = true
	sv, err := semver.NewVersion(version)
	if err != nil {
		msg.Debug("Ignoring %s version %s: %s", name, version, err)
		return
	}

	latest, found := m.latest[name]
	if found {
		lv, err := semver.NewVersion(latest)
		if err == nil {
			if sv.GreaterThan(lv) {
				m.latest[name] = version
			}
		}
	} else {
		m.latest[name] = version
	}

	found = false
	for _, v := range m.versions[name] {
		if v == version {
			found = true
		}
	}
	if !found {
		m.versions[name] = append(m.versions[name], version)
	}
}

func (m *memCache) touch(name string) {
	m.Lock()
	defer m.Unlock()
	m.t[name] = true
}

func (m *memCache) touched(name string) bool {
	m.RLock()
	defer m.RUnlock()
	return m.t[name]
}

func (m *memCache) getLatest(name string) string {
	m.RLock()
	defer m.RUnlock()
	return m.latest[name]
}


================================================
FILE: cfg/cfg.go
================================================
// Package cfg handles working with the Glide configuration files.
//
// The cfg package contains the ability to parse (unmarshal) and write (marshal)
// glide.yaml and glide.lock files. These files contains the details about
// projects managed by Glide.
//
// To convert yaml into a cfg.Config instance use the cfg.ConfigFromYaml function.
// The yaml, typically in a glide.yaml file, has the following structure.
//
//     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
//     excludeDirs:
//     - node_modules
//     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.io
//    - license: The license is either an SPDX license string or the filepath to the
//      license. This allows automation and consumers to easily identify the license.
//    - owners: 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.
//    - excludeDirs: A list of directories in the local codebase to exclude from
//      scanning for dependencies.
//    - 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.
//        - version: A semantic version, semantic version range, branch, tag, or
//          commit id to use.
//        - 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.
//    - testImport: A list of development packages not already listed under import.
//      Each package has the same details as those listed under import.
package cfg


================================================
FILE: cfg/config.go
================================================
package cfg

import (
	"crypto/sha256"
	"fmt"
	"io/ioutil"
	"reflect"
	"sort"
	"strings"

	"github.com/Masterminds/glide/mirrors"
	"github.com/Masterminds/glide/util"
	"github.com/Masterminds/vcs"
	"gopkg.in/yaml.v2"
)

// Config is the top-level configuration object.
type Config struct {

	// Name is the name of the package or application.
	Name string `yaml:"package"`

	// Description is a short description for a package, application, or library.
	// This description is similar but different to a Go package description as
	// it is for marketing and presentation purposes rather than technical ones.
	Description string `json:"description,omitempty"`

	// Home is a url to a website for the package.
	Home string `yaml:"homepage,omitempty"`

	// License provides either a SPDX license or a path to a file containing
	// the license. For more information on SPDX see http://spdx.org/licenses/.
	// When more than one license an SPDX expression can be used.
	License string `yaml:"license,omitempty"`

	// Owners is an array of owners for a project. See the Owner type for
	// more detail. These can be one or more people, companies, or other
	// organizations.
	Owners Owners `yaml:"owners,omitempty"`

	// Ignore contains a list of packages to ignore fetching. This is useful
	// when walking the package tree (including packages of packages) to list
	// those to skip.
	Ignore []string `yaml:"ignore,omitempty"`

	// Exclude contains a list of directories in the local application to
	// exclude from scanning for dependencies.
	Exclude []string `yaml:"excludeDirs,omitempty"`

	// Imports contains a list of all non-development imports for a project. For
	// more detail on how these are captured see the Dependency type.
	Imports Dependencies `yaml:"import"`

	// DevImports contains the test or other development imports for a project.
	// See the Dependency type for more details on how this is recorded.
	DevImports Dependencies `yaml:"testImport,omitempty"`
}

// A transitive representation of a dependency for importing and exporting to yaml.
type cf struct {
	Name        string       `yaml:"package"`
	Description string       `yaml:"description,omitempty"`
	Home        string       `yaml:"homepage,omitempty"`
	License     string       `yaml:"license,omitempty"`
	Owners      Owners       `yaml:"owners,omitempty"`
	Ignore      []string     `yaml:"ignore,omitempty"`
	Exclude     []string     `yaml:"excludeDirs,omitempty"`
	Imports     Dependencies `yaml:"import"`
	DevImports  Dependencies `yaml:"testImport,omitempty"`
}

// ConfigFromYaml returns an instance of Config from YAML
func ConfigFromYaml(yml []byte) (*Config, error) {
	cfg := &Config{}
	err := yaml.Unmarshal([]byte(yml), &cfg)
	return cfg, err
}

// Marshal converts a Config instance to YAML
func (c *Config) Marshal() ([]byte, error) {
	yml, err := yaml.Marshal(&c)
	if err != nil {
		return []byte{}, err
	}
	return yml, nil
}

// UnmarshalYAML is a hook for gopkg.in/yaml.v2 in the unmarshalling process
func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
	newConfig := &cf{}
	if err := unmarshal(&newConfig); err != nil {
		return err
	}
	c.Name = newConfig.Name
	c.Description = newConfig.Description
	c.Home = newConfig.Home
	c.License = newConfig.License
	c.Owners = newConfig.Owners
	c.Ignore = newConfig.Ignore
	c.Exclude = newConfig.Exclude
	c.Imports = newConfig.Imports
	c.DevImports = newConfig.DevImports

	// Cleanup the Config object now that we have it.
	err := c.DeDupe()

	return err
}

// MarshalYAML is a hook for gopkg.in/yaml.v2 in the marshaling process
func (c *Config) MarshalYAML() (interface{}, error) {
	newConfig := &cf{
		Name:        c.Name,
		Description: c.Description,
		Home:        c.Home,
		License:     c.License,
		Owners:      c.Owners,
		Ignore:      c.Ignore,
		Exclude:     c.Exclude,
	}
	i, err := c.Imports.Clone().DeDupe()
	if err != nil {
		return newConfig, err
	}

	di, err := c.DevImports.Clone().DeDupe()
	if err != nil {
		return newConfig, err
	}

	newConfig.Imports = i
	newConfig.DevImports = di

	return newConfig, nil
}

// HasDependency returns true if the given name is listed as an import or dev import.
func (c *Config) HasDependency(name string) bool {
	for _, d := range c.Imports {
		if d.Name == name {
			return true
		}
	}
	for _, d := range c.DevImports {
		if d.Name == name {
			return true
		}
	}
	return false
}

// HasIgnore returns true if the given name is listed on the ignore list.
func (c *Config) HasIgnore(name string) bool {
	for _, v := range c.Ignore {

		// Check for both a name and to make sure sub-packages are ignored as
		// well.
		if v == name || strings.HasPrefix(name, v+"/") {
			return true
		}
	}

	return false
}

// HasExclude returns true if the given name is listed on the exclude list.
func (c *Config) HasExclude(ex string) bool {
	ep := normalizeSlash(ex)
	for _, v := range c.Exclude {
		if vp := normalizeSlash(v); vp == ep {
			return true
		}
	}

	return false
}

// Clone performs a deep clone of the Config instance
func (c *Config) Clone() *Config {
	n := &Config{}
	n.Name = c.Name
	n.Description = c.Description
	n.Home = c.Home
	n.License = c.License
	n.Owners = c.Owners.Clone()
	n.Ignore = c.Ignore
	n.Exclude = c.Exclude
	n.Imports = c.Imports.Clone()
	n.DevImports = c.DevImports.Clone()
	return n
}

// WriteFile writes a Glide YAML file.
//
// This is a convenience function that marshals the YAML and then writes it to
// the given file. If the file exists, it will be clobbered.
func (c *Config) WriteFile(glidepath string) error {
	o, err := c.Marshal()
	if err != nil {
		return err
	}
	return ioutil.WriteFile(glidepath, o, 0666)
}

// DeDupe consolidates duplicate dependencies on a Config instance
func (c *Config) DeDupe() error {

	// Remove duplicates in the imports
	var err error
	c.Imports, err = c.Imports.DeDupe()
	if err != nil {
		return err
	}
	c.DevImports, err = c.DevImports.DeDupe()
	if err != nil {
		return err
	}

	// If the name on the config object is part of the imports remove it.
	found := -1
	for i, dep := range c.Imports {
		if dep.Name == c.Name {
			found = i
		}
	}
	if found >= 0 {
		c.Imports = append(c.Imports[:found], c.Imports[found+1:]...)
	}

	found = -1
	for i, dep := range c.DevImports {
		if dep.Name == c.Name {
			found = i
		}
	}
	if found >= 0 {
		c.DevImports = append(c.DevImports[:found], c.DevImports[found+1:]...)
	}

	// If something is on the ignore list remove it from the imports.
	for _, v := range c.Ignore {
		found = -1
		for k, d := range c.Imports {
			if v == d.Name {
				found = k
			}
		}
		if found >= 0 {
			c.Imports = append(c.Imports[:found], c.Imports[found+1:]...)
		}

		found = -1
		for k, d := range c.DevImports {
			if v == d.Name {
				found = k
			}
		}
		if found >= 0 {
			c.DevImports = append(c.DevImports[:found], c.DevImports[found+1:]...)
		}
	}

	return nil
}

// AddImport appends dependencies to the import list, deduplicating as we go.
func (c *Config) AddImport(deps ...*Dependency) error {
	t := c.Imports
	t = append(t, deps...)
	t, err := t.DeDupe()
	if err != nil {
		return err
	}
	c.Imports = t
	return nil
}

// Hash generates a sha256 hash for a given Config
func (c *Config) Hash() (string, error) {
	yml, err := c.Marshal()
	if err != nil {
		return "", err
	}

	hash := sha256.New()
	hash.Write(yml)
	return fmt.Sprintf("%x", hash.Sum(nil)), nil
}

// Dependencies is a collection of Dependency
type Dependencies []*Dependency

// Get a dependency by name
func (d Dependencies) Get(name string) *Dependency {
	for _, dep := range d {
		if dep.Name == name {
			return dep
		}
	}
	return nil
}

// Has checks if a dependency is on a list of dependencies such as import or testImport
func (d Dependencies) Has(name string) bool {
	for _, dep := range d {
		if dep.Name == name {
			return true
		}
	}
	return false
}

// Remove removes a dependency from a list of dependencies
func (d Dependencies) Remove(name string) Dependencies {
	found := -1
	for i, dep := range d {
		if dep.Name == name {
			found = i
		}
	}

	if found >= 0 {
		copy(d[found:], d[found+1:])
		d[len(d)-1] = nil
		return d[:len(d)-1]
	}
	return d
}

// Clone performs a deep clone of Dependencies
func (d Dependencies) Clone() Dependencies {
	n := make(Dependencies, 0, len(d))
	for _, v := range d {
		n = append(n, v.Clone())
	}
	return n
}

// DeDupe cleans up duplicates on a list of dependencies.
func (d Dependencies) DeDupe() (Dependencies, error) {
	checked := map[string]int{}
	imports := make(Dependencies, 0, 1)
	i := 0
	for _, dep := range d {
		// The first time we encounter a dependency add it to the list
		if val, ok := checked[dep.Name]; !ok {
			checked[dep.Name] = i
			imports = append(imports, dep)
			i++
		} else {
			// In here we've encountered a dependency for the second time.
			// Make sure the details are the same or return an error.
			v := imports[val]
			if dep.Reference != v.Reference {
				return d, fmt.Errorf("Import %s repeated with different versions '%s' and '%s'", dep.Name, dep.Reference, v.Reference)
			}
			if dep.Repository != v.Repository || dep.VcsType != v.VcsType {
				return d, fmt.Errorf("Import %s repeated with different Repository details", dep.Name)
			}
			if !reflect.DeepEqual(dep.Os, v.Os) || !reflect.DeepEqual(dep.Arch, v.Arch) {
				return d, fmt.Errorf("Import %s repeated with different OS or Architecture filtering", dep.Name)
			}
			imports[checked[dep.Name]].Subpackages = stringArrayDeDupe(v.Subpackages, dep.Subpackages...)
		}
	}

	return imports, nil
}

// Dependency describes a package that the present package depends upon.
type Dependency struct {
	Name        string   `yaml:"package"`
	Reference   string   `yaml:"version,omitempty"`
	Pin         string   `yaml:"-"`
	Repository  string   `yaml:"repo,omitempty"`
	VcsType     string   `yaml:"vcs,omitempty"`
	Subpackages []string `yaml:"subpackages,omitempty"`
	Arch        []string `yaml:"arch,omitempty"`
	Os          []string `yaml:"os,omitempty"`
}

// A transitive representation of a dependency for importing and exploting to yaml.
type dep struct {
	Name        string   `yaml:"package"`
	Reference   string   `yaml:"version,omitempty"`
	Ref         string   `yaml:"ref,omitempty"`
	Repository  string   `yaml:"repo,omitempty"`
	VcsType     string   `yaml:"vcs,omitempty"`
	Subpackages []string `yaml:"subpackages,omitempty"`
	Arch        []string `yaml:"arch,omitempty"`
	Os          []string `yaml:"os,omitempty"`
}

// DependencyFromLock converts a Lock to a Dependency
func DependencyFromLock(lock *Lock) *Dependency {
	return &Dependency{
		Name:        lock.Name,
		Reference:   lock.Version,
		Repository:  lock.Repository,
		VcsType:     lock.VcsType,
		Subpackages: lock.Subpackages,
		Arch:        lock.Arch,
		Os:          lock.Os,
	}
}

// UnmarshalYAML is a hook for gopkg.in/yaml.v2 in the unmarshaling process
func (d *Dependency) UnmarshalYAML(unmarshal func(interface{}) error) error {
	newDep := &dep{}
	err := unmarshal(&newDep)
	if err != nil {
		return err
	}
	d.Name = newDep.Name
	d.Reference = newDep.Reference
	d.Repository = newDep.Repository
	d.VcsType = newDep.VcsType
	d.Subpackages = newDep.Subpackages
	d.Arch = newDep.Arch
	d.Os = newDep.Os

	if d.Reference == "" && newDep.Ref != "" {
		d.Reference = newDep.Ref
	}

	// Make sure only legitimate VCS are listed.
	d.VcsType = filterVcsType(d.VcsType)

	// Get the root name for the package
	tn, subpkg := util.NormalizeName(d.Name)
	d.Name = tn
	if subpkg != "" {
		d.Subpackages = append(d.Subpackages, subpkg)
	}

	// Older versions of Glide had a / prefix on subpackages in some cases.
	// Here that's cleaned up. Someday we should be able to remove this.
	for k, v := range d.Subpackages {
		d.Subpackages[k] = strings.TrimPrefix(v, "/")
	}

	return nil
}

// MarshalYAML is a hook for gopkg.in/yaml.v2 in the marshaling process
func (d *Dependency) MarshalYAML() (interface{}, error) {

	// Make sure we only write the correct vcs type to file
	t := filterVcsType(d.VcsType)
	newDep := &dep{
		Name:        d.Name,
		Reference:   d.Reference,
		Repository:  d.Repository,
		VcsType:     t,
		Subpackages: d.Subpackages,
		Arch:        d.Arch,
		Os:          d.Os,
	}

	return newDep, nil
}

// Remote returns the remote location to fetch source from. This location is
// the central place where mirrors can alter the location.
func (d *Dependency) Remote() string {
	var r string

	if d.Repository != "" {
		r = d.Repository
	} else {
		r = "https://" + d.Name
	}

	f, nr, _ := mirrors.Get(r)
	if f {
		return nr
	}

	return r
}

// Vcs returns the VCS type to fetch source from.
func (d *Dependency) Vcs() string {
	var r string

	if d.Repository != "" {
		r = d.Repository
	} else {
		r = "https://" + d.Name
	}

	f, _, nv := mirrors.Get(r)
	if f {
		return nv
	}

	return d.VcsType
}

// GetRepo retrieves a Masterminds/vcs repo object configured for the root
// of the package being retrieved.
func (d *Dependency) GetRepo(dest string) (vcs.Repo, error) {

	// The remote location is either the configured repo or the package
	// name as an https url.
	remote := d.Remote()

	VcsType := d.Vcs()

	// If the VCS type has a value we try that first.
	if len(VcsType) > 0 && VcsType != "None" {
		switch vcs.Type(VcsType) {
		case vcs.Git:
			return vcs.NewGitRepo(remote, dest)
		case vcs.Svn:
			return vcs.NewSvnRepo(remote, dest)
		case vcs.Hg:
			return vcs.NewHgRepo(remote, dest)
		case vcs.Bzr:
			return vcs.NewBzrRepo(remote, dest)
		default:
			return nil, fmt.Errorf("Unknown VCS type %s set for %s", VcsType, d.Name)
		}
	}

	// When no type set we try to autodetect.
	return vcs.NewRepo(remote, dest)
}

// Clone creates a clone of a Dependency
func (d *Dependency) Clone() *Dependency {
	return &Dependency{
		Name:        d.Name,
		Reference:   d.Reference,
		Pin:         d.Pin,
		Repository:  d.Repository,
		VcsType:     d.VcsType,
		Subpackages: d.Subpackages,
		Arch:        d.Arch,
		Os:          d.Os,
	}
}

// HasSubpackage returns if the subpackage is present on the dependency
func (d *Dependency) HasSubpackage(sub string) bool {

	for _, v := range d.Subpackages {
		if sub == v {
			return true
		}
	}

	return false
}

// Owners is a list of owners for a project.
type Owners []*Owner

// Clone performs a deep clone of Owners
func (o Owners) Clone() Owners {
	n := make(Owners, 0, 1)
	for _, v := range o {
		n = append(n, v.Clone())
	}
	return n
}

// Owner describes an owner of a package. This can be a person, company, or
// other organization. This is useful if someone needs to contact the
// owner of a package to address things like a security issue.
type Owner struct {

	// Name describes the name of an organization.
	Name string `yaml:"name,omitempty"`

	// Email is an email address to reach the owner at.
	Email string `yaml:"email,omitempty"`

	// Home is a url to a website for the owner.
	Home string `yaml:"homepage,omitempty"`
}

// Clone creates a clone of a Dependency
func (o *Owner) Clone() *Owner {
	return &Owner{
		Name:  o.Name,
		Email: o.Email,
		Home:  o.Home,
	}
}

func stringArrayDeDupe(s []string, items ...string) []string {
	for _, item := range items {
		exists := false
		for _, v := range s {
			if v == item {
				exists = true
			}
		}
		if !exists {
			s = append(s, item)
		}
	}
	sort.Strings(s)
	return s
}

func filterVcsType(vcs string) string {
	switch vcs {
	case "git", "hg", "bzr", "svn":
		return vcs
	case "mercurial":
		return "hg"
	case "bazaar":
		return "bzr"
	case "subversion":
		return "svn"
	default:
		return ""
	}
}

func normalizeSlash(k string) string {
	return strings.Replace(k, "\\", "/", -1)
}


================================================
FILE: cfg/config_test.go
================================================
package cfg

import (
	"testing"

	"gopkg.in/yaml.v2"
)

var yml = `
package: fake/testing
description: foo bar baz
homepage: https://example.com
license: MIT
owners:
- name: foo
  email: bar@example.com
  homepage: https://example.com
import:
  - package: github.com/kylelemons/go-gypsy
    subpackages:
      - yaml
  # Intentionally left spaces at end of next line.
  - package: github.com/Masterminds/convert
    repo: git@github.com:Masterminds/convert.git
    vcs: git
    ref: a9949121a2e2192ca92fa6dddfeaaa4a4412d955
    subpackages:
      - color
      - nautical
      - radial
    os:
      - linux
    arch:
      - i386
      - arm
  - package: github.com/Masterminds/structable
  - package: github.com/Masterminds/cookoo/color
  - package: github.com/Masterminds/cookoo/convert

testImport:
  - package: github.com/kylelemons/go-gypsy
`

func TestManualConfigFromYaml(t *testing.T) {
	cfg := &Config{}
	err := yaml.Unmarshal([]byte(yml), &cfg)
	if err != nil {
		t.Errorf("Unable to Unmarshal config yaml")
	}

	if cfg.Name != "fake/testing" {
		t.Errorf("Inaccurate name found %s", cfg.Name)
	}

	if cfg.Description != "foo bar baz" {
		t.Errorf("Inaccurate description found %s", cfg.Description)
	}

	if cfg.Home != "https://example.com" {
		t.Errorf("Inaccurate homepage found %s", cfg.Home)
	}

	if cfg.License != "MIT" {
		t.Errorf("Inaccurate license found %s", cfg.License)
	}

	found := false
	found2 := false
	for _, i := range cfg.Imports {
		if i.Name == "github.com/Masterminds/convert" {
			found = true
			ref := "a9949121a2e2192ca92fa6dddfeaaa4a4412d955"
			if i.Reference != ref {
				t.Errorf("Config reference for cookoo is inaccurate. Expected '%s' found '%s'", ref, i.Reference)
			}
		}

		if i.Name == "github.com/Masterminds/cookoo" {
			found2 = true
			if i.Subpackages[0] != "color" {
				t.Error("Dependency separating package and subpackage not working")
			}
		}
	}
	if !found {
		t.Error("Unable to find github.com/Masterminds/convert")
	}
	if !found2 {
		t.Error("Unable to find github.com/Masterminds/cookoo")
	}
}

func TestClone(t *testing.T) {
	cfg := &Config{}
	err := yaml.Unmarshal([]byte(yml), &cfg)
	if err != nil {
		t.Errorf("Unable to Unmarshal config yaml")
	}

	cfg2 := cfg.Clone()
	if cfg2.Name != "fake/testing" {
		t.Error("Config cloning failed")
	}
	if cfg2.License != "MIT" {
		t.Error("Config cloning failed to copy License")
	}
	cfg.Name = "foo"

	if cfg.Name == cfg2.Name {
		t.Error("Cloning Config name failed")
	}
}

func TestConfigFromYaml(t *testing.T) {
	c, err := ConfigFromYaml([]byte(yml))
	if err != nil {
		t.Error("ConfigFromYaml failed to parse yaml")
	}

	if c.Name != "fake/testing" {
		t.Error("ConfigFromYaml failed to properly parse yaml")
	}
}

func TestHasDependency(t *testing.T) {
	c, err := ConfigFromYaml([]byte(yml))
	if err != nil {
		t.Error("ConfigFromYaml failed to parse yaml for HasDependency")
	}

	if c.HasDependency("github.com/Masterminds/convert") != true {
		t.Error("HasDependency failing to pickup depenency")
	}

	if c.HasDependency("foo/bar/bar") != false {
		t.Error("HasDependency picking up dependency it shouldn't")
	}
}

func TestOwners(t *testing.T) {
	o := new(Owner)
	o.Name = "foo"
	o.Email = "foo@example.com"
	o.Home = "https://foo.example.com"

	o2 := o.Clone()
	if o2.Name != o.Name || o2.Email != o.Email || o2.Home != o.Home {
		t.Error("Unable to clone Owner")
	}

	o.Name = "Bar"
	if o.Name == o2.Name {
		t.Error("Owner clone is a pointer instead of a clone")
	}

	s := make(Owners, 0, 1)
	s = append(s, o)
	s2 := s.Clone()
	o3 := s2[0]

	o3.Name = "Qux"

	if o3.Name == o.Name {
		t.Error("Owners cloning isn't deep")
	}

	cfg := &Config{}
	err := yaml.Unmarshal([]byte(yml), &cfg)
	if err != nil {
		t.Errorf("Unable to Unmarshal config yaml")
	}

	if cfg.Owners[0].Name != "foo" ||
		cfg.Owners[0].Email != "bar@example.com" ||
		cfg.Owners[0].Home != "https://example.com" {
		t.Error("Unable to parse owners from yaml")
	}
}


================================================
FILE: cfg/lock.go
================================================
package cfg

import (
	"crypto/sha256"
	"fmt"
	"io/ioutil"
	"sort"
	"strings"
	"time"

	"gopkg.in/yaml.v2"
)

// Lockfile represents a glide.lock file.
type Lockfile struct {
	Hash       string    `yaml:"hash"`
	Updated    time.Time `yaml:"updated"`
	Imports    Locks     `yaml:"imports"`
	DevImports Locks     `yaml:"testImports"`
}

// LockfileFromYaml returns an instance of Lockfile from YAML
func LockfileFromYaml(yml []byte) (*Lockfile, error) {
	lock := &Lockfile{}
	err := yaml.Unmarshal([]byte(yml), &lock)
	return lock, err
}

// Marshal converts a Config instance to YAML
func (lf *Lockfile) Marshal() ([]byte, error) {
	yml, err := yaml.Marshal(&lf)
	if err != nil {
		return []byte{}, err
	}
	return yml, nil
}

// MarshalYAML is a hook for gopkg.in/yaml.v2.
// It sorts import subpackages lexicographically for reproducibility.
func (lf *Lockfile) MarshalYAML() (interface{}, error) {
	for _, imp := range lf.Imports {
		sort.Strings(imp.Subpackages)
	}

	// Ensure elements on testImport don't already exist on import.
	var newDI Locks
	var found bool
	for _, imp := range lf.DevImports {
		found = false
		for i := 0; i < len(lf.Imports); i++ {
			if lf.Imports[i].Name == imp.Name {
				found = true
				if lf.Imports[i].Version != imp.Version {
					return lf, fmt.Errorf("Generating lock YAML produced conflicting versions of %s. import (%s), testImport (%s)", imp.Name, lf.Imports[i].Version, imp.Version)
				}
			}
		}

		if !found {
			newDI = append(newDI, imp)
		}
	}
	lf.DevImports = newDI

	for _, imp := range lf.DevImports {
		sort.Strings(imp.Subpackages)
	}
	return lf, nil
}

// WriteFile writes a Glide lock file.
//
// This is a convenience function that marshals the YAML and then writes it to
// the given file. If the file exists, it will be clobbered.
func (lf *Lockfile) WriteFile(lockpath string) error {
	o, err := lf.Marshal()
	if err != nil {
		return err
	}
	return ioutil.WriteFile(lockpath, o, 0666)
}

// Clone returns a clone of Lockfile
func (lf *Lockfile) Clone() *Lockfile {
	n := &Lockfile{}
	n.Hash = lf.Hash
	n.Updated = lf.Updated
	n.Imports = lf.Imports.Clone()
	n.DevImports = lf.DevImports.Clone()

	return n
}

// Fingerprint returns a hash of the contents minus the date. This allows for
// two lockfiles to be compared irrespective of their updated times.
func (lf *Lockfile) Fingerprint() ([32]byte, error) {
	c := lf.Clone()
	c.Updated = time.Time{} // Set the time to be the nil equivalent
	sort.Sort(c.Imports)
	sort.Sort(c.DevImports)
	yml, err := c.Marshal()
	if err != nil {
		return [32]byte{}, err
	}

	return sha256.Sum256(yml), nil
}

// ReadLockFile loads the contents of a glide.lock file.
func ReadLockFile(lockpath string) (*Lockfile, error) {
	yml, err := ioutil.ReadFile(lockpath)
	if err != nil {
		return nil, err
	}
	lock, err := LockfileFromYaml(yml)
	if err != nil {
		return nil, err
	}
	return lock, nil
}

// Locks is a slice of locked dependencies.
type Locks []*Lock

// Clone returns a Clone of Locks.
func (l Locks) Clone() Locks {
	n := make(Locks, 0, len(l))
	for _, v := range l {
		n = append(n, v.Clone())
	}
	return n
}

// Len returns the length of the Locks. This is needed for sorting with
// the sort package.
func (l Locks) Len() int {
	return len(l)
}

// Less is needed for the sort interface. It compares two locks based on
// their name.
func (l Locks) Less(i, j int) bool {

	// Names are normalized to lowercase because case affects sorting order. For
	// example, Masterminds comes before kylelemons. Making them lowercase
	// causes kylelemons to come first which is what is expected.
	return strings.ToLower(l[i].Name) < strings.ToLower(l[j].Name)
}

// Swap is needed for the sort interface. It swaps the position of two
// locks.
func (l Locks) Swap(i, j int) {
	l[i], l[j] = l[j], l[i]
}

// Lock represents an individual locked dependency.
type Lock struct {
	Name        string   `yaml:"name"`
	Version     string   `yaml:"version"`
	Repository  string   `yaml:"repo,omitempty"`
	VcsType     string   `yaml:"vcs,omitempty"`
	Subpackages []string `yaml:"subpackages,omitempty"`
	Arch        []string `yaml:"arch,omitempty"`
	Os          []string `yaml:"os,omitempty"`
}

// Clone creates a clone of a Lock.
func (l *Lock) Clone() *Lock {
	return &Lock{
		Name:        l.Name,
		Version:     l.Version,
		Repository:  l.Repository,
		VcsType:     l.VcsType,
		Subpackages: l.Subpackages,
		Arch:        l.Arch,
		Os:          l.Os,
	}
}

// LockFromDependency converts a Dependency to a Lock
func LockFromDependency(dep *Dependency) *Lock {
	return &Lock{
		Name:        dep.Name,
		Version:     dep.Pin,
		Repository:  dep.Repository,
		VcsType:     dep.VcsType,
		Subpackages: dep.Subpackages,
		Arch:        dep.Arch,
		Os:          dep.Os,
	}
}

// NewLockfile is used to create an instance of Lockfile.
func NewLockfile(ds, tds Dependencies, hash string) (*Lockfile, error) {
	lf := &Lockfile{
		Hash:       hash,
		Updated:    time.Now(),
		Imports:    make([]*Lock, len(ds)),
		DevImports: make([]*Lock, 0),
	}

	for i := 0; i < len(ds); i++ {
		lf.Imports[i] = LockFromDependency(ds[i])
	}

	sort.Sort(lf.Imports)

	var found bool
	for i := 0; i < len(tds); i++ {
		found = false
		for ii := 0; ii < len(ds); ii++ {
			if ds[ii].Name == tds[i].Name {
				found = true
				if ds[ii].Reference != tds[i].Reference {
					return &Lockfile{}, fmt.Errorf("Generating lock produced conflicting versions of %s. import (%s), testImport (%s)", tds[i].Name, ds[ii].Reference, tds[i].Reference)
				}
				break
			}
		}
		if !found {
			lf.DevImports = append(lf.DevImports, LockFromDependency(tds[i]))
		}
	}

	sort.Sort(lf.DevImports)

	return lf, nil
}

// LockfileFromMap takes a map of dependencies and generates a lock Lockfile instance.
func LockfileFromMap(ds map[string]*Dependency, hash string) *Lockfile {
	lf := &Lockfile{
		Hash:    hash,
		Updated: time.Now(),
		Imports: make([]*Lock, len(ds)),
	}

	i := 0
	for name, dep := range ds {
		lf.Imports[i] = LockFromDependency(dep)
		lf.Imports[i].Name = name
		i++
	}

	sort.Sort(lf.Imports)

	return lf
}


================================================
FILE: cfg/lock_test.go
================================================
package cfg

import (
	"sort"
	"strings"
	"testing"
)

func TestSortLocks(t *testing.T) {
	c, err := ConfigFromYaml([]byte(yml))
	if err != nil {
		t.Error("ConfigFromYaml failed to parse yaml for TestSortDependencies")
	}

	ls := make(Locks, len(c.Imports))
	for i := 0; i < len(c.Imports); i++ {
		ls[i] = &Lock{
			Name:    c.Imports[i].Name,
			Version: c.Imports[i].Reference,
		}
	}

	if ls[2].Name != "github.com/Masterminds/structable" {
		t.Error("Initial dependencies are out of order prior to sort")
	}

	sort.Sort(ls)

	if ls[0].Name != "github.com/kylelemons/go-gypsy" ||
		ls[1].Name != "github.com/Masterminds/convert" ||
		ls[2].Name != "github.com/Masterminds/cookoo" ||
		ls[3].Name != "github.com/Masterminds/structable" {
		t.Error("Sorting of dependencies failed")
	}
}

const inputSubpkgYaml = `
imports:
- name: github.com/gogo/protobuf
  version: 82d16f734d6d871204a3feb1a73cb220cc92574c
  subpackages:
  - plugin/equal
  - sortkeys
  - plugin/face
  - plugin/gostring
  - vanity
  - plugin/grpc
  - plugin/marshalto
  - plugin/populate
  - plugin/oneofcheck
  - plugin/size
  - plugin/stringer
  - plugin/defaultcheck
  - plugin/embedcheck
  - plugin/description
  - plugin/enumstringer
  - gogoproto
  - plugin/testgen
  - plugin/union
  - plugin/unmarshal
  - protoc-gen-gogo/generator
  - protoc-gen-gogo/plugin
  - vanity/command
  - protoc-gen-gogo/descriptor
  - proto
`
const expectSubpkgYaml = `
imports:
- name: github.com/gogo/protobuf
  version: 82d16f734d6d871204a3feb1a73cb220cc92574c
  subpackages:
  - gogoproto
  - plugin/defaultcheck
  - plugin/description
  - plugin/embedcheck
  - plugin/enumstringer
  - plugin/equal
  - plugin/face
  - plugin/gostring
  - plugin/grpc
  - plugin/marshalto
  - plugin/oneofcheck
  - plugin/populate
  - plugin/size
  - plugin/stringer
  - plugin/testgen
  - plugin/union
  - plugin/unmarshal
  - proto
  - protoc-gen-gogo/descriptor
  - protoc-gen-gogo/generator
  - protoc-gen-gogo/plugin
  - sortkeys
  - vanity
  - vanity/command
`

func TestSortSubpackages(t *testing.T) {
	lf, err := LockfileFromYaml([]byte(inputSubpkgYaml))
	if err != nil {
		t.Fatal(err)
	}

	out, err := lf.Marshal()
	if err != nil {
		t.Fatal(err)
	}

	if !strings.Contains(string(out), expectSubpkgYaml) {
		t.Errorf("Expected %q\n to contain\n%q", string(out), expectSubpkgYaml)
	}
}


================================================
FILE: dependency/resolver.go
================================================
package dependency

import (
	"container/list"
	"errors"
	"runtime"
	"sort"

	//"go/build"
	"os"
	"path/filepath"
	"strings"

	"github.com/Masterminds/glide/cfg"
	"github.com/Masterminds/glide/msg"
	gpath "github.com/Masterminds/glide/path"
	"github.com/Masterminds/glide/util"
)

// MissingPackageHandler handles the case where a package is missing during scanning.
//
// It returns true if the package can be passed to the resolver, false otherwise.
// False may be returned even if error is nil.
type MissingPackageHandler interface {
	// NotFound is called when the Resolver fails to find a package with the given name.
	//
	// NotFound returns true when the resolver should attempt to re-resole the
	// dependency (e.g. when NotFound has gone and fetched the missing package).
	//
	// When NotFound returns false, the Resolver does not try to do any additional
	// work on the missing package.
	//
	// NotFound only returns errors when it fails to perform its internal goals.
	// When it returns false with no error, this indicates that the handler did
	// its job, but the resolver should not do any additional work on the
	// package.
	NotFound(pkg string, addTest bool) (bool, error)

	// OnGopath is called when the Resolver finds a dependency, but it's only on GOPATH.
	//
	// OnGopath provides an opportunity to copy, move, warn, or ignore cases like this.
	//
	// OnGopath returns true when the resolver should attempt to re-resolve the
	// dependency (e.g. when the dependency is copied to a new location).
	//
	// When OnGopath returns false, the Resolver does not try to do any additional
	// work on the package.
	//
	// An error indicates that OnGopath cannot complete its intended operation.
	// Not all false results are errors.
	OnGopath(pkg string, addTest bool) (bool, error)

	// InVendor is called when the Resolver finds a dependency in the vendor/ directory.
	//
	// This can be used update a project found in the vendor/ folder.
	InVendor(pkg string, addTest bool) error

	// PkgPath is called to find the location locally to scan. This gives the
	// handler to do things such as use a cached location.
	PkgPath(pkg string) string
}

// DefaultMissingPackageHandler is the default handler for missing packages.
//
// When asked to handle a missing package, it will report the miss as a warning,
// and then store the package in the Missing slice for later access.
type DefaultMissingPackageHandler struct {
	Missing []string
	Gopath  []string
	Prefix  string
}

// NotFound prints a warning and then stores the package name in Missing.
//
// It never returns an error, and it always returns false.
func (d *DefaultMissingPackageHandler) NotFound(pkg string, addTest bool) (bool, error) {
	msg.Warn("Package %s is not installed", pkg)
	d.Missing = append(d.Missing, pkg)
	return false, nil
}

// OnGopath is run when a package is missing from vendor/ but found in the GOPATH
func (d *DefaultMissingPackageHandler) OnGopath(pkg string, addTest bool) (bool, error) {
	msg.Warn("Package %s is only on GOPATH.", pkg)
	d.Gopath = append(d.Gopath, pkg)
	return false, nil
}

// InVendor is run when a package is found in the vendor/ folder
func (d *DefaultMissingPackageHandler) InVendor(pkg string, addTest bool) error {
	msg.Info("Package %s found in vendor/ folder", pkg)
	return nil
}

// PkgPath returns the path to the package
func (d *DefaultMissingPackageHandler) PkgPath(pkg string) string {
	if d.Prefix != "" {
		return filepath.Join(d.Prefix, pkg)
	}
	return pkg
}

// VersionHandler sets the version for a package when found while scanning.
//
// When a package if found it needs to be on the correct version before
// scanning its contents to be sure to pick up the right elements for that
// version.
type VersionHandler interface {

	// Process provides an opportunity to process the codebase for version setting.
	Process(pkg string) error

	// SetVersion sets the version for a package. An error is returned if there
	// was a problem setting the version.
	SetVersion(pkg string, testDep bool) error
}

// DefaultVersionHandler is the default handler for setting the version.
//
// The default handler leaves the current version and skips setting a version.
// For a handler that alters the version see the handler included in the repo
// package as part of the installer.
type DefaultVersionHandler struct{}

// Process a package to aide in version setting.
func (d *DefaultVersionHandler) Process(pkg string) error {
	return nil
}

// SetVersion here sends a message when a package is found noting that it
// did not set the version.
func (d *DefaultVersionHandler) SetVersion(pkg string, testDep bool) error {
	msg.Warn("Version not set for package %s", pkg)
	return nil
}

// Resolver resolves a dependency tree.
//
// It operates in two modes:
// - local resolution (ResolveLocal) determines the dependencies of the local project.
// - vendor resolving (Resolve, ResolveAll) determines the dependencies of vendored
//   projects.
//
// Local resolution is for guessing initial dependencies. Vendor resolution is
// for determining vendored dependencies.
type Resolver struct {
	Handler        MissingPackageHandler
	VersionHandler VersionHandler
	VendorDir      string
	BuildContext   *util.BuildCtxt
	Config         *cfg.Config

	// ResolveAllFiles toggles deep scanning.
	// If this is true, resolve by scanning all files, not by walking the
	// import tree.
	ResolveAllFiles bool

	// ResolveTest sets if test dependencies should be resolved.
	ResolveTest bool

	// Items already in the queue.
	alreadyQ map[string]bool

	// Attempts to scan that had unrecoverable error.
	hadError map[string]bool

	basedir string
	seen    map[string]bool

	// findCache caches hits from Find. This reduces the number of filesystem
	// touches that have to be done for dependency resolution.
	findCache map[string]*PkgInfo
}

// NewResolver returns a new Resolver initialized with the DefaultMissingPackageHandler.
//
// This will return an error if the given path does not meet the basic criteria
// for a Go source project. For example, basedir must have a vendor subdirectory.
//
// The BuildContext uses the "go/build".Default to resolve dependencies.
func NewResolver(basedir string) (*Resolver, error) {

	var err error
	basedir, err = filepath.Abs(basedir)
	if err != nil {
		return nil, err
	}

	basedir, err = checkForBasedirSymlink(basedir)

	if err != nil {
		return nil, err
	}

	vdir := filepath.Join(basedir, "vendor")

	buildContext, err := util.GetBuildContext()
	if err != nil {
		return nil, err
	}

	r := &Resolver{
		Handler:        &DefaultMissingPackageHandler{Missing: []string{}, Gopath: []string{}},
		VersionHandler: &DefaultVersionHandler{},
		basedir:        basedir,
		VendorDir:      vdir,
		BuildContext:   buildContext,
		seen:           map[string]bool{},
		alreadyQ:       map[string]bool{},
		hadError:       map[string]bool{},
		findCache:      map[string]*PkgInfo{},

		// The config instance here should really be replaced with a real one.
		Config: &cfg.Config{},
	}

	// TODO: Make sure the build context is correctly set up. Especially in
	// regards to GOROOT, which is not always set.

	return r, nil
}

// Resolve takes a package name and returns all of the imported package names.
//
// If a package is not found, this calls the Fetcher. If the Fetcher returns
// true, it will re-try traversing that package for dependencies. Otherwise it
// will add that package to the deps array and continue on without trying it.
// And if the Fetcher returns an error, this will stop resolution and return
// the error.
//
// If basepath is set to $GOPATH, this will start from that package's root there.
// If basepath is set to a project's vendor path, the scanning will begin from
// there.
func (r *Resolver) Resolve(pkg, basepath string) ([]string, error) {
	target := filepath.Join(basepath, filepath.FromSlash(pkg))
	//msg.Debug("Scanning %s", target)
	l := list.New()
	l.PushBack(target)

	// In this mode, walk the entire tree.
	if r.ResolveAllFiles {
		return r.resolveList(l, false, false)
	}
	return r.resolveImports(l, false, false)
}

// dirHasPrefix tests whether the directory dir begins with prefix.
func dirHasPrefix(dir, prefix string) bool {
	if runtime.GOOS != "windows" {
		return strings.HasPrefix(dir, prefix)
	}
	return len(dir) >= len(prefix) && strings.EqualFold(dir[:len(prefix)], prefix)
}

// ResolveLocal resolves dependencies for the current project.
//
// This begins with the project, builds up a list of external dependencies.
//
// If the deep flag is set to true, this will then resolve all of the dependencies
// of the dependencies it has found. If not, it will return just the packages that
// the base project relies upon.
func (r *Resolver) ResolveLocal(deep bool) ([]string, []string, error) {
	// We build a list of local source to walk, then send this list
	// to resolveList.
	msg.Debug("Resolving local dependencies")
	l := list.New()
	tl := list.New()
	alreadySeen := map[string]bool{}
	talreadySeen := map[string]bool{}
	err := filepath.Walk(r.basedir, func(path string, fi os.FileInfo, err error) error {
		if err != nil && err != filepath.SkipDir {
			return err
		}
		pt := strings.TrimPrefix(path, r.basedir+string(os.PathSeparator))
		pt = strings.TrimSuffix(pt, string(os.PathSeparator))
		if r.Config.HasExclude(pt) {
			msg.Debug("Excluding %s", pt)
			return filepath.SkipDir
		}
		if !fi.IsDir() {
			return nil
		}
		if !srcDir(fi) {
			return filepath.SkipDir
		}

		// Scan for dependencies, and anything that's not part of the local
		// package gets added to the scan list.
		var imps []string
		var testImps []string
		p, err := r.BuildContext.ImportDir(path, 0)
		if err != nil {
			if strings.HasPrefix(err.Error(), "no buildable Go source") {
				return nil
			} else if strings.HasPrefix(err.Error(), "found packages ") {
				// If we got here it's because a package and multiple packages
				// declared. This is often because of an example with a package
				// or main but +build ignore as a build tag. In that case we
				// try to brute force the packages with a slower scan.
				imps, testImps, err = IterativeScan(path)
				if err != nil {
					return err
				}
			} else {
				return err
			}
		} else {
			imps = p.Imports
			testImps = dedupeStrings(p.TestImports, p.XTestImports)
		}

		// We are only looking for dependencies in vendor. No root, cgo, etc.
		for _, imp := range imps {
			if r.Config.HasIgnore(imp) {
				continue
			}
			if alreadySeen[imp] {
				continue
			}
			alreadySeen[imp] = true
			info := r.FindPkg(imp)
			switch info.Loc {
			case LocUnknown, LocVendor:
				l.PushBack(filepath.Join(r.VendorDir, filepath.FromSlash(imp))) // Do we need a path on this?
			case LocGopath:
				if !dirHasPrefix(info.Path, r.basedir) {
					// FIXME: This is a package outside of the project we're
					// scanning. It should really be on vendor. But we don't
					// want it to reference GOPATH. We want it to be detected
					// and moved.
					l.PushBack(filepath.Join(r.VendorDir, filepath.FromSlash(imp)))
				}
			case LocRelative:
				if strings.HasPrefix(imp, "./"+gpath.VendorDir) {
					msg.Warn("Go package resolving will resolve %s without the ./%s/ prefix", imp, gpath.VendorDir)
				}
			}
		}

		if r.ResolveTest {
			for _, imp := range testImps {
				if talreadySeen[imp] {
					continue
				}
				talreadySeen[imp] = true
				info := r.FindPkg(imp)
				switch info.Loc {
				case LocUnknown, LocVendor:
					tl.PushBack(filepath.Join(r.VendorDir, filepath.FromSlash(imp))) // Do we need a path on this?
				case LocGopath:
					if !dirHasPrefix(info.Path, r.basedir) {
						// FIXME: This is a package outside of the project we're
						// scanning. It should really be on vendor. But we don't
						// want it to reference GOPATH. We want it to be detected
						// and moved.
						tl.PushBack(filepath.Join(r.VendorDir, filepath.FromSlash(imp)))
					}
				case LocRelative:
					if strings.HasPrefix(imp, "./"+gpath.VendorDir) {
						msg.Warn("Go package resolving will resolve %s without the ./%s/ prefix", imp, gpath.VendorDir)
					}
				}
			}
		}

		return nil
	})

	if err != nil {
		msg.Err("Failed to build an initial list of packages to scan: %s", err)
		return []string{}, []string{}, err
	}

	if deep {
		if r.ResolveAllFiles {
			re, err := r.resolveList(l, false, false)
			if err != nil {
				return []string{}, []string{}, err
			}
			tre, err := r.resolveList(l, false, true)
			return re, tre, err
		}
		re, err := r.resolveImports(l, false, false)
		if err != nil {
			return []string{}, []string{}, err
		}
		tre, err := r.resolveImports(tl, true, true)
		return re, tre, err
	}

	// If we're not doing a deep scan, we just convert the list into an
	// array and return.
	res := make([]string, 0, l.Len())
	for e := l.Front(); e != nil; e = e.Next() {
		res = append(res, e.Value.(string))
	}
	tres := make([]string, 0, l.Len())
	if r.ResolveTest {
		for e := tl.Front(); e != nil; e = e.Next() {
			tres = append(tres, e.Value.(string))
		}
	}

	return res, tres, nil
}

// ResolveAll takes a list of packages and returns an inclusive list of all
// vendored dependencies.
//
// While this will scan all of the source code it can find, it will only return
// packages that were either explicitly passed in as deps, or were explicitly
// imported by the code.
//
// Packages that are either CGO or on GOROOT are ignored. Packages that are
// on GOPATH, but not vendored currently generate a warning.
//
// If one of the passed in packages does not exist in the vendor directory,
// an error is returned.
func (r *Resolver) ResolveAll(deps []*cfg.Dependency, addTest bool) ([]string, error) {

	queue := sliceToQueue(deps, r.VendorDir)

	if r.ResolveAllFiles {
		return r.resolveList(queue, false, addTest)
	}
	return r.resolveImports(queue, false, addTest)
}

// Stripv strips the vendor/ prefix from vendored packages.
func (r *Resolver) Stripv(str string) string {
	return strings.TrimPrefix(str, r.VendorDir+string(os.PathSeparator))
}

// vpath adds an absolute vendor path.
func (r *Resolver) vpath(str string) string {
	return filepath.Join(r.basedir, "vendor", str)
}

// resolveImports takes a list of existing packages and resolves their imports.
//
// It returns a list of all of the packages that it can determine are required
// for the given code to function.
//
// The expectation is that each item in the queue is an absolute path to a
// vendored package. This attempts to read that package, and then find
// its referenced packages. Those packages are then added to the list
// to be scanned next.
//
// The resolver's handler is used in the cases where a package cannot be
// located.
//
// testDeps specifies if the test dependencies should be resolved and addTest
// specifies if the dependencies should be added to the Config.DevImports. This
// is important because we may resolve normal dependencies of test deps and add
// them to the DevImports list.
func (r *Resolver) resolveImports(queue *list.List, testDeps, addTest bool) ([]string, error) {
	msg.Debug("Resolving import path")

	// When test deps passed in but not resolving return empty.
	if (testDeps || addTest) && !r.ResolveTest {
		return []string{}, nil
	}

	alreadySeen := make(map[string]bool, queue.Len())

	for e := queue.Front(); e != nil; e = e.Next() {
		vdep := e.Value.(string)
		dep := r.Stripv(vdep)
		// Check if marked in the Q and then explicitly mark it. We want to know
		// if it had previously been marked and ensure it for the future.

		if alreadySeen[dep] {
			continue
		}
		alreadySeen[dep] = true

		_, foundQ := r.alreadyQ[dep]
		r.alreadyQ[dep] = true

		// If we've already encountered an error processing this dependency
		// skip it.
		_, foundErr := r.hadError[dep]
		if foundErr {
			continue
		}

		// Skip ignored packages
		if r.Config.HasIgnore(dep) {
			msg.Debug("Ignoring: %s", dep)
			continue
		}
		r.VersionHandler.Process(dep)
		// Here, we want to import the package and see what imports it has.
		msg.Debug("Trying to open %s (%s)", dep, r.Handler.PkgPath(dep))
		var imps []string
		pkg, err := r.BuildContext.ImportDir(r.Handler.PkgPath(dep), 0)
		if err != nil && strings.HasPrefix(err.Error(), "found packages ") {
			// If we got here it's because a package and multiple packages
			// declared. This is often because of an example with a package
			// or main but +build ignore as a build tag. In that case we
			// try to brute force the packages with a slower scan.
			msg.Debug("Using Iterative Scanning for %s", dep)
			if testDeps {
				_, imps, err = IterativeScan(r.Handler.PkgPath(dep))
			} else {
				imps, _, err = IterativeScan(r.Handler.PkgPath(dep))
			}

			if err != nil {
				msg.Err("Iterative scanning error %s: %s", dep, err)
				continue
			}
		} else if err != nil {
			errStr := err.Error()
			msg.Debug("ImportDir error on %s: %s", r.Handler.PkgPath(dep), err)
			if strings.HasPrefix(errStr, "no buildable Go source") {
				msg.Debug("No subpackages declared. Skipping %s.", dep)
				continue
			} else if osDirNotFound(err, r.Handler.PkgPath(dep)) && !foundErr && !foundQ {
				// If the location doesn't exist, there hasn't already been an
				// error, it's not already been in the Q then try to fetch it.
				// When there's an error or it's already in the Q (it should be
				// fetched if it's marked in r.alreadyQ) we skip to make sure
				// not to get stuck in a recursion.

				// If the location doesn't exist try to fetch it.
				if ok, err2 := r.Handler.NotFound(dep, addTest); ok {
					r.alreadyQ[dep] = true
					alreadySeen[dep] = false

					// By adding to the queue it will get reprocessed now that
					// it exists.
					queue.PushBack(r.vpath(dep))
					r.VersionHandler.SetVersion(dep, addTest)
				} else if err2 != nil {
					r.hadError[dep] = true
					msg.Err("Error looking for %s: %s", dep, err2)
				} else {
					r.hadError[dep] = true
					// TODO (mpb): Should we toss this into a Handler to
					// see if this is on GOPATH and copy it?
					msg.Info("Not found in vendor/: %s (1)", dep)
				}
			} else if strings.Contains(errStr, "no such file or directory") {
				r.hadError[dep] = true
				msg.Err("Error scanning %s: %s", dep, err)
				msg.Err("This error means the referenced package was not found.")
				msg.Err("Missing file or directory errors usually occur when multiple packages")
				msg.Err("share a common dependency and the first reference encountered by the scanner")
				msg.Err("sets the version to one that does not contain a subpackage needed required")
				msg.Err("by another package that uses the shared dependency. Try setting a")
				msg.Err("version in your glide.yaml that works for all packages that share this")
				msg.Err("dependency.")
			} else {
				r.hadError[dep] = true
				msg.Err("Error scanning %s: %s", dep, err)
			}
			continue
		} else {
			if testDeps {
				imps = dedupeStrings(pkg.TestImports, pkg.XTestImports)
			} else {
				imps = pkg.Imports
			}

		}

		// Range over all of the identified imports and see which ones we
		// can locate.
		for _, imp := range imps {
			if r.Config.HasIgnore(imp) {
				msg.Debug("Ignoring: %s", imp)
				continue
			}
			pi := r.FindPkg(imp)
			if pi.Loc != LocCgo && pi.Loc != LocGoroot && pi.Loc != LocAppengine {
				msg.Debug("Package %s imports %s", dep, imp)
			}
			switch pi.Loc {
			case LocVendor:
				msg.Debug("In vendor: %s", imp)
				if _, ok := r.alreadyQ[imp]; !ok {
					msg.Debug("Marking %s to be scanned.", imp)
					r.alreadyQ[imp] = true
					queue.PushBack(r.vpath(imp))
					if err := r.Handler.InVendor(imp, addTest); err == nil {
						r.VersionHandler.SetVersion(imp, addTest)
					} else {
						msg.Warn("Error updating %s: %s", imp, err)
					}
				}
			case LocUnknown:
				msg.Debug("Missing %s. Trying to resolve.", imp)
				if ok, err := r.Handler.NotFound(imp, addTest); ok {
					r.alreadyQ[imp] = true
					queue.PushBack(r.vpath(imp))
					r.VersionHandler.SetVersion(imp, addTest)
				} else if err != nil {
					r.hadError[imp] = true
					msg.Err("Error looking for %s: %s", imp, err)
				} else {
					r.hadError[imp] = true
					msg.Err("Not found: %s (2)", imp)
				}
			case LocGopath:
				msg.Debug("Found on GOPATH, not vendor: %s", imp)
				if _, ok := r.alreadyQ[imp]; !ok {
					// Only scan it if it gets moved into vendor/
					if ok, _ := r.Handler.OnGopath(imp, addTest); ok {
						r.alreadyQ[imp] = true
						queue.PushBack(r.vpath(imp))
						r.VersionHandler.SetVersion(imp, addTest)
					}
				}
			}
		}

	}

	if len(r.hadError) > 0 {
		// Errors occurred so we return.
		return []string{}, errors.New("Error resolving imports")
	}

	// FIXME: From here to the end is a straight copy of the resolveList() func.
	res := make([]string, 0, queue.Len())

	// In addition to generating a list
	for e := queue.Front(); e != nil; e = e.Next() {
		t := r.Stripv(e.Value.(string))
		root, sp := util.NormalizeName(t)

		if root == r.Config.Name {
			continue
		}

		// Skip ignored packages
		if r.Config.HasIgnore(e.Value.(string)) {
			msg.Debug("Ignoring: %s", e.Value.(string))
			continue
		}

		// TODO(mattfarina): Need to eventually support devImport
		existing := r.Config.Imports.Get(root)
		if existing == nil && addTest {
			existing = r.Config.DevImports.Get(root)
		}
		if existing != nil {
			if sp != "" && !existing.HasSubpackage(sp) {
				existing.Subpackages = append(existing.Subpackages, sp)
			}
		} else {
			newDep := &cfg.Dependency{
				Name: root,
			}
			if sp != "" {
				newDep.Subpackages = []string{sp}
			}

			if addTest {
				r.Config.DevImports = append(r.Config.DevImports, newDep)
			} else {
				r.Config.Imports = append(r.Config.Imports, newDep)
			}
		}
		res = append(res, t)
	}

	return res, nil
}

// resolveList takes a list and resolves it.
//
// This walks the entire file tree for the given dependencies, not just the
// parts that are imported directly. Using this will discover dependencies
// regardless of OS, and arch.
func (r *Resolver) resolveList(queue *list.List, testDeps, addTest bool) ([]string, error) {
	// When test deps passed in but not resolving return empty.
	if testDeps && !r.ResolveTest {
		return []string{}, nil
	}

	var failedDep string
	var failedDepPath string
	var pkgPath string
	for e := queue.Front(); e != nil; e = e.Next() {
		dep := e.Value.(string)
		t := strings.TrimPrefix(dep, r.VendorDir+string(os.PathSeparator))
		if r.Config.HasIgnore(t) {
			msg.Debug("Ignoring: %s", t)
			continue
		}
		r.VersionHandler.Process(t)
		//msg.Warn("#### %s ####", dep)
		//msg.Info("Seen Count: %d", len(r.seen))
		// Catch the outtermost dependency.
		pkgPath = r.Handler.PkgPath(t)
		failedDep = t
		failedDepPath = pkgPath
		err := filepath.Walk(pkgPath, func(path string, fi os.FileInfo, err error) error {
			if err != nil && err != filepath.SkipDir {
				return err
			}

			// Skip files.
			if !fi.IsDir() {
				return nil
			}
			// Skip dirs that are not source.
			if !srcDir(fi) {
				//msg.Debug("Skip resource %s", fi.Name())
				return filepath.SkipDir
			}

			// Anything that comes through here has already been through
			// the queue.
			r.alreadyQ[path] = true
			e := r.queueUnseen(path, queue, testDeps, addTest)
			if e != nil {
				failedDepPath = path
				//msg.Err("Failed to fetch dependency %s: %s", path, err)
			}
			return e
		})
		if err != nil && err != filepath.SkipDir {
			msg.Err("Dependency %s (%s) failed to resolve: %s.", failedDep, failedDepPath, err)
			return []string{}, err
		}
	}

	res := make([]string, 0, queue.Len())

	// In addition to generating a list
	for e := queue.Front(); e != nil; e = e.Next() {
		t := strings.TrimPrefix(e.Value.(string), r.VendorDir+string(os.PathSeparator))
		root, sp := util.NormalizeName(t)

		if root == r.Config.Name {
			continue
		}

		existing := r.Config.Imports.Get(root)
		if existing == nil && addTest {
			existing = r.Config.DevImports.Get(root)
		}

		if existing != nil {
			if sp != "" && !existing.HasSubpackage(sp) {
				existing.Subpackages = append(existing.Subpackages, sp)
			}
		} else {
			newDep := &cfg.Dependency{
				Name: root,
			}
			if sp != "" {
				newDep.Subpackages = []string{sp}
			}

			if addTest {
				r.Config.DevImports = append(r.Config.DevImports, newDep)
			} else {
				r.Config.Imports = append(r.Config.Imports, newDep)
			}
		}
		res = append(res, e.Value.(string))
	}

	return res, nil
}

// queueUnseenImports scans a package's imports and adds any new ones to the
// processing queue.
func (r *Resolver) queueUnseen(pkg string, queue *list.List, testDeps, addTest bool) error {
	// A pkg is marked "seen" as soon as we have inspected it the first time.
	// Seen means that we have added all of its imports to the list.

	// Already queued indicates that we've either already put it into the queue
	// or intentionally not put it in the queue for fatal reasons (e.g. no
	// buildable source).

	deps, err := r.imports(pkg, testDeps, addTest)
	if err != nil && !strings.HasPrefix(err.Error(), "no buildable Go source") {
		msg.Err("Could not find %s: %s", pkg, err)
		return err
		// NOTE: If we uncomment this, we get lots of "no buildable Go source" errors,
		// which don't ever seem to be helpful. They don't actually indicate an error
		// condition, and it's perfectly okay to run into that condition.
		//} else if err != nil {
		//	msg.Warn(err.Error())
	}

	for _, d := range deps {
		if _, ok := r.alreadyQ[d]; !ok {
			r.alreadyQ[d] = true
			queue.PushBack(d)
		}
	}
	return nil
}

// imports gets all of the imports for a given package.
//
// If the package is in GOROOT, this will return an empty list (but not
// an error).
// If it cannot resolve the pkg, it will return an error.
func (r *Resolver) imports(pkg string, testDeps, addTest bool) ([]string, error) {

	if r.Config.HasIgnore(pkg) {
		msg.Debug("Ignoring %s", pkg)
		return []string{}, nil
	}

	// If this pkg is marked seen, we don't scan it again.
	if _, ok := r.seen[pkg]; ok {
		msg.Debug("Already saw %s", pkg)
		return []string{}, nil
	}

	// FIXME: On error this should try to NotFound to the dependency, and then import
	// it again.
	var imps []string
	p, err := r.BuildContext.ImportDir(pkg, 0)
	if err != nil && strings.HasPrefix(err.Error(), "found packages ") {
		// If we got here it's because a package and multiple packages
		// declared. This is often because of an example with a package
		// or main but +build ignore as a build tag. In that case we
		// try to brute force the packages with a slower scan.
		if testDeps {
			_, imps, err = IterativeScan(r.Handler.PkgPath(pkg))
		} else {
			imps, _, err = IterativeScan(r.Handler.PkgPath(pkg))
		}

		if err != nil {
			return []string{}, err
		}
	} else if err != nil {
		return []string{}, err
	} else {
		if testDeps {
			imps = dedupeStrings(p.TestImports, p.XTestImports)
		} else {
			imps = p.Imports
		}
	}

	// It is okay to scan a package more than once. In some cases, this is
	// desirable because the package can change between scans (e.g. as a result
	// of a failed scan resolving the situation).
	msg.Debug("=> Scanning %s (%s)", p.ImportPath, pkg)
	r.seen[pkg] = true

	// Optimization: If it's in GOROOT, it has no imports worth scanning.
	if p.Goroot {
		return []string{}, nil
	}

	// We are only looking for dependencies in vendor. No root, cgo, etc.
	buf := []string{}
	for _, imp := range imps {
		if r.Config.HasIgnore(imp) {
			msg.Debug("Ignoring %s", imp)
			continue
		}
		info := r.FindPkg(imp)
		switch info.Loc {
		case LocUnknown:
			// Do we resolve here?
			found, err := r.Handler.NotFound(imp, addTest)
			if err != nil {
				msg.Err("Failed to fetch %s: %s", imp, err)
			}
			if found {
				buf = append(buf, filepath.Join(r.VendorDir, filepath.FromSlash(imp)))
				r.VersionHandler.SetVersion(imp, addTest)
				continue
			}
			r.seen[info.Path] = true
		case LocVendor:
			//msg.Debug("Vendored: %s", imp)
			buf = append(buf, info.Path)
			if err := r.Handler.InVendor(imp, addTest); err == nil {
				r.VersionHandler.SetVersion(imp, addTest)
			} else {
				msg.Warn("Error updating %s: %s", imp, err)
			}
		case LocGopath:
			found, err := r.Handler.OnGopath(imp, addTest)
			if err != nil {
				msg.Err("Failed to fetch %s: %s", imp, err)
			}
			// If the Handler marks this as found, we drop it into the buffer
			// for subsequent processing. Otherwise, we assume that we're
			// in a less-than-perfect, but functional, situation.
			if found {
				buf = append(buf, filepath.Join(r.VendorDir, filepath.FromSlash(imp)))
				r.VersionHandler.SetVersion(imp, addTest)
				continue
			}
			msg.Warn("Package %s is on GOPATH, but not vendored. Ignoring.", imp)
			r.seen[info.Path] = true
		default:
			// Local packages are an odd case. CGO cannot be scanned.
			msg.Debug("===> Skipping %s", imp)
		}
	}

	return buf, nil
}

// sliceToQueue is a special-purpose function for unwrapping a slice of
// dependencies into a queue of fully qualified paths.
func sliceToQueue(deps []*cfg.Dependency, basepath string) *list.List {
	l := list.New()
	for _, e := range deps {
		if len(e.Subpackages) > 0 {
			for _, v := range e.Subpackages {
				ip := e.Name
				if v != "." && v != "" {
					ip = ip + "/" + v
				}
				msg.Debug("Adding local Import %s to queue", ip)
				l.PushBack(filepath.Join(basepath, filepath.FromSlash(ip)))
			}
		} else {
			msg.Debug("Adding local Import %s to queue", e.Name)
			l.PushBack(filepath.Join(basepath, filepath.FromSlash(e.Name)))
		}

	}
	return l
}

// PkgLoc describes the location of the package.
type PkgLoc uint8

const (
	// LocUnknown indicates the package location is unknown (probably not present)
	LocUnknown PkgLoc = iota
	// LocLocal inidcates that the package is in a local dir, not GOPATH or GOROOT.
	LocLocal
	// LocVendor indicates that the package is in a vendor/ dir
	LocVendor
	// LocGopath inidcates that the package is in GOPATH
	LocGopath
	// LocGoroot indicates that the package is in GOROOT
	LocGoroot
	// LocCgo indicates that the package is a a CGO package
	LocCgo
	// LocAppengine indicates the package is part of the appengine SDK. It's a
	// special build mode. https://blog.golang.org/the-app-engine-sdk-and-workspaces-gopath
	// Why does a Google product get a special case build mode with a local
	// package?
	LocAppengine
	// LocRelative indicates the package is a relative directory
	LocRelative
)

// PkgInfo represents metadata about a package found by the resolver.
type PkgInfo struct {
	Name, Path string
	Vendored   bool
	Loc        PkgLoc
}

// PackagesAddedToStdlib is the list of packages added to the go standard lib
// at various points.
var PackagesAddedToStdlib = map[string]struct{}{
	// context and net/http/httptrace are packages being added to
	// the Go 1.7 standard library. Some packages, such as golang.org/x/net
	// are importing it with build flags in files for go1.7.
	"context":            struct{}{},
	"net/http/httptrace": struct{}{},

	// math.bits are packages being added to the Go 1.9 standard library.
	// Some packages, such as github.com/RoaringBitmap/roaring are importing
	// it with build flags in files for go1.9.
	"math/bits": struct{}{},

	// crypto/ed25519 is a package being added to the Go 1.13 standard library.
	// It is importing itself  with build flags in files for go1.13.
	"crypto/ed25519": struct{}{},
}

// FindPkg takes a package name and attempts to find it on the filesystem
//
// The resulting PkgInfo will indicate where it was found.
func (r *Resolver) FindPkg(name string) *PkgInfo {
	// We cachae results for FindPkg to reduce the number of filesystem ops
	// that we have to do. This is a little risky because certain directories,
	// like GOPATH, can be modified while we're running an operation, and
	// render the cache inaccurate.
	//
	// Unfound items (LocUnknown) are never cached because we assume that as
	// part of the response, the Resolver may fetch that dependency.
	if i, ok := r.findCache[name]; ok {
		//msg.Info("Cache hit on %s", name)
		return i
	}

	// 502 individual packages scanned.
	// No cache:
	// glide -y etcd.yaml list  0.27s user 0.19s system 85% cpu 0.534 total
	// With cache:
	// glide -y etcd.yaml list  0.22s user 0.15s system 85% cpu 0.438 total

	var p string
	info := &PkgInfo{
		Name: name,
	}

	if strings.HasPrefix(name, "./") || strings.HasPrefix(name, "../") {
		info.Loc = LocRelative
		r.findCache[name] = info
		return info
	}

	// Check _only_ if this dep is in the current vendor directory.
	p = filepath.Join(r.VendorDir, filepath.FromSlash(name))
	if pkgExists(p) {
		info.Path = p
		info.Loc = LocVendor
		info.Vendored = true
		r.findCache[name] = info
		return info
	}

	// TODO: Do we need this if we always flatten?
	// Recurse backward to scan other vendor/ directories
	//for wd := cwd; wd != "/"; wd = filepath.Dir(wd) {
	//p = filepath.Join(wd, "vendor", filepath.FromSlash(name))
	//if fi, err = os.Stat(p); err == nil && (fi.IsDir() || isLink(fi)) {
	//info.Path = p
	//info.PType = ptypeVendor
	//info.Vendored = true
	//return info
	//}
	//}

	// Check $GOPATH
	for _, rr := range filepath.SplitList(r.BuildContext.GOPATH) {
		p = filepath.Join(rr, "src", filepath.FromSlash(name))
		if pkgExists(p) {
			info.Path = p
			info.Loc = LocGopath
			r.findCache[name] = info
			return info
		}
	}

	// Check $GOROOT
	for _, rr := range filepath.SplitList(r.BuildContext.GOROOT) {
		p = filepath.Join(rr, "src", filepath.FromSlash(name))
		if pkgExists(p) {
			info.Path = p
			info.Loc = LocGoroot
			r.findCache[name] = info
			return info
		}
	}

	// If this is "C", we're dealing with cgo
	if name == "C" {
		info.Loc = LocCgo
		r.findCache[name] = info
	} else if name == "appengine" || name == "appengine_internal" ||
		strings.HasPrefix(name, "appengine/") ||
		strings.HasPrefix(name, "appengine_internal/") {
		// Appengine is a special case when it comes to Go builds. It is a local
		// looking package only available within appengine. It's a special case
		// where Google products are playing with each other.
		// https://blog.golang.org/the-app-engine-sdk-and-workspaces-gopath
		info.Loc = LocAppengine
		r.findCache[name] = info
	} else if _, ok := PackagesAddedToStdlib[name]; ok {
		// Various packages are being added to the Go standard library, and being imported
		// with build flags. Need to detect this and handle it.
		info.Loc = LocGoroot
		r.findCache[name] = info
	}

	return info
}

func pkgExists(path string) bool {
	fi, err := os.Stat(path)
	return err == nil && (fi.IsDir() || isLink(fi))
}

// isLink returns true if the given FileInfo is a symbolic link.
func isLink(fi os.FileInfo) bool {
	return fi.Mode()&os.ModeSymlink == os.ModeSymlink
}

// IsSrcDir returns true if this is a directory that could have source code,
// false otherwise.
//
// Directories with _ or . prefixes are skipped, as are testdata and vendor.
func IsSrcDir(fi os.FileInfo) bool {
	return srcDir(fi)
}

func srcDir(fi os.FileInfo) bool {
	if !fi.IsDir() {
		return false
	}

	// Ignore _foo and .foo
	if strings.HasPrefix(fi.Name(), "_") || strings.HasPrefix(fi.Name(), ".") {
		return false
	}

	// Ignore testdata. For now, ignore vendor.
	if fi.Name() == "testdata" || fi.Name() == "vendor" {
		return false
	}

	return true
}

// checkForBasedirSymlink checks to see if the given basedir is actually a
// symlink. In the case that it is a symlink, the symlink is read and returned.
// If the basedir is not a symlink, the provided basedir argument is simply
// returned back to the caller.
func checkForBasedirSymlink(basedir string) (string, error) {
	fi, err := os.Lstat(basedir)
	if err != nil {
		return "", err
	}

	if fi.Mode()&os.ModeSymlink != 0 {
		return os.Readlink(basedir)
	}

	return basedir, nil
}

// helper func to merge, dedupe, and sort strings
func dedupeStrings(s1, s2 []string) (r []string) {
	dedupe := make(map[string]bool)

	if len(s1) > 0 && len(s2) > 0 {
		for _, i := range s1 {
			dedupe[i] = true
		}
		for _, i := range s2 {
			dedupe[i] = true
		}

		for i := range dedupe {
			r = append(r, i)
		}
		// And then re-sort them
		sort.Strings(r)
	} else if len(s1) > 0 {
		r = s1
	} else if len(s2) > 0 {
		r = s2
	}

	return
}

// In Go 1.9 go/build.ImportDir changed so that a missing dir
// no longer responses with os.IsNotExist. Instead the error changed
// one in the form of fmt.Errorf("cannot find package %q in:\n\t%s", path, p.Dir)
// which is similar to other go/build.ImportDir errors. This function
// attempts to detect when ImportDir thinks something is not found
func osDirNotFound(err error, p string) bool {

	if os.IsNotExist(err) {
		return true
	}

	// Since there are multiple errors that start like this we need to make
	// sure the directory is not present
	if strings.HasPrefix(err.Error(), "cannot find package ") {
		_, nferr := os.Stat(p)
		if os.IsNotExist(nferr) {
			return true
		}
	}

	return false
}


================================================
FILE: dependency/resolver_test.go
================================================
package dependency

import (
	"os"
	"path/filepath"
	"strings"
	"testing"

	"github.com/Masterminds/glide/cfg"
)

func TestResolveLocalShallow(t *testing.T) {
	r, err := NewResolver("../")
	if err != nil {
		t.Fatal(err)
	}

	l, _, err := r.ResolveLocal(false)
	if err != nil {
		t.Fatalf("Failed to resolve: %s", err)
	}

	expect := []string{
		filepath.FromSlash("github.com/Masterminds/semver"),
		filepath.FromSlash("github.com/Masterminds/vcs"),
		filepath.FromSlash("gopkg.in/yaml.v2"),
		filepath.FromSlash("github.com/codegangsta/cli"),
	}

	for _, p := range expect {
		found := false
		for _, li := range l {
			if strings.HasSuffix(li, p) {
				found = true
				break
			}
		}
		if !found {
			t.Errorf("Could not find %s in resolved list.", p)
		}
	}
}

func TestResolveLocalDeep(t *testing.T) {
	r, err := NewResolver("../")
	if err != nil {
		t.Fatal(err)
	}
	h := &DefaultMissingPackageHandler{Missing: []string{}, Gopath: []string{}, Prefix: "../vendor"}
	r.Handler = h

	l, _, err := r.ResolveLocal(true)
	if err != nil {
		t.Fatalf("Failed to resolve: %s", err)
	}

	if len(l) < 4 {
		t.Errorf("Expected at least 4 deps, got %d", len(l))
	}
}

func TestResolve(t *testing.T) {
	r, err := NewResolver("../")
	if err != nil {
		t.Fatal(err)
	}
	h := &DefaultMissingPackageHandler{Missing: []string{}, Gopath: []string{}, Prefix: "../vendor"}
	r.Handler = h

	base := filepath.Join(os.Getenv("GOPATH"), "src/github.com/Masterminds/glide/vendor")
	l, err := r.Resolve("github.com/codegangsta/cli", base)
	if err != nil {
		t.Fatalf("Failed to resolve: %s", err)
	}

	if len(l) != 1 {
		t.Errorf("Expected 1 dep, got %d: %s", len(l), l[0])
	}

	if !strings.HasSuffix(filepath.FromSlash("github.com/codegangsta/cli"), l[0]) {
		t.Errorf("Unexpected package name: %s", l[0])
	}
}

func TestResolveAll(t *testing.T) {
	// These are build dependencies of Glide, so we know they are here.
	deps := []*cfg.Dependency{
		{Name: "github.com/codegangsta/cli"},
		{Name: "github.com/Masterminds/semver"},
		{Name: "github.com/Masterminds/vcs"},
		{Name: "gopkg.in/yaml.v2"},
	}

	r, err := NewResolver("../")
	if err != nil {
		t.Fatalf("No new resolver: %s", err)
	}
	h := &DefaultMissingPackageHandler{Missing: []string{}, Gopath: []string{}, Prefix: "../vendor"}
	r.Handler = h
	l, err := r.ResolveAll(deps, false)
	if err != nil {
		t.Fatalf("Failed to resolve: %s", err)
	}

	if len(l) < len(deps) {
		t.Errorf("Expected at least %d deps, got %d", len(deps), len(l))
	}
}


================================================
FILE: dependency/scan.go
================================================
package dependency

import (
	"bytes"
	"io"
	"os"
	"path/filepath"
	"strings"
	"text/scanner"

	"github.com/Masterminds/glide/msg"
	"github.com/Masterminds/glide/util"
)

var osList []string
var archList []string

func init() {
	// The supported systems are listed in
	// https://github.com/golang/go/blob/master/src/go/build/syslist.go
	// The lists are not exported so we need to duplicate them here.
	osListString := "android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows"
	osList = strings.Split(osListString, " ")

	archListString := "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc s390 s390x sparc sparc64"
	archList = strings.Split(archListString, " ")
}

// IterativeScan attempts to obtain a list of imported dependencies from a
// package. This scanning is different from ImportDir as part of the go/build
// package. It looks over different permutations of the supported OS/Arch to
// try and find all imports. This is different from setting UseAllFiles to
// true on the build Context. It scopes down to just the supported OS/Arch.
//
// Note, there are cases where multiple packages are in the same directory. This
// usually happens with an example that has a main package and a +build tag
// of ignore. This is a bit of a hack. It causes UseAllFiles to have errors.
func IterativeScan(path string) ([]string, []string, error) {

	// TODO(mattfarina): Add support for release tags.

	tgs, _ := readBuildTags(path)
	// Handle the case of scanning with no tags
	tgs = append(tgs, "")

	var pkgs []string
	var testPkgs []string
	for _, tt := range tgs {

		// split the tag combination to look at permutations.
		ts := strings.Split(tt, ",")
		var ttgs []string
		var arch string
		var ops string
		for _, ttt := range ts {
			dirty := false
			if strings.HasPrefix(ttt, "!") {
				dirty = true
				ttt = strings.TrimPrefix(ttt, "!")
			}
			if isSupportedOs(ttt) {
				if dirty {
					ops = getOsValue(ttt)
				} else {
					ops = ttt
				}
			} else if isSupportedArch(ttt) {
				if dirty {
					arch = getArchValue(ttt)
				} else {
					arch = ttt
				}
			} else {
				if !dirty {
					ttgs = append(ttgs, ttt)
				}
			}
		}

		// Handle the case where there are no tags but we need to iterate
		// on something.
		if len(ttgs) == 0 {
			ttgs = append(ttgs, "")
		}

		b, err := util.GetBuildContext()
		if err != nil {
			return []string{}, []string{}, err
		}

		// Make sure use all files is off
		b.UseAllFiles = false

		// Set the OS and Arch for this pass
		b.GOARCH = arch
		b.GOOS = ops
		b.BuildTags = ttgs
		msg.Debug("Scanning with Arch(%s), OS(%s), and Build Tags(%v)", arch, ops, ttgs)

		pk, err := b.ImportDir(path, 0)

		// If there are no buildable souce with this permutation we skip it.
		if err != nil && strings.HasPrefix(err.Error(), "no buildable Go source files in") {
			continue
		} else if err != nil && strings.HasPrefix(err.Error(), "found packages ") {
			// A permutation may cause multiple packages to appear. For example,
			// an example file with an ignore build tag. If this happens we
			// ignore it.
			// TODO(mattfarina): Find a better way.
			msg.Debug("Found multiple packages while scanning %s: %s", path, err)
			continue
		} else if err != nil {
			msg.Debug("Problem parsing package at %s for %s %s", path, ops, arch)
			return []string{}, []string{}, err
		}

		for _, dep := range pk.Imports {
			found := false
			for _, p := range pkgs {
				if p == dep {
					found = true
				}
			}
			if !found {
				pkgs = append(pkgs, dep)
			}
		}

		for _, dep := range pk.TestImports {
			found := false
			for _, p := range pkgs {
				if p == dep {
					found = true
				}
			}
			if !found {
				testPkgs = append(testPkgs, dep)
			}
		}

		for _, dep := range pk.XTestImports {
			found := false
			for _, p := range pkgs {
				if p == dep {
					found = true
				}
			}
			if !found {
				testPkgs = append(testPkgs, dep)
			}
		}
	}

	return pkgs, testPkgs, nil
}

func readBuildTags(p string) ([]string, error) {
	_, err := os.Stat(p)
	if err != nil {
		return []string{}, err
	}

	d, err := os.Open(p)
	if err != nil {
		return []string{}, err
	}

	objects, err := d.Readdir(-1)
	if err != nil {
		return []string{}, err
	}

	var tags []string
	for _, obj := range objects {

		// only process Go files
		if strings.HasSuffix(obj.Name(), ".go") {
			fp := filepath.Join(p, obj.Name())

			co, err := readGoContents(fp)
			if err != nil {
				return []string{}, err
			}

			// Only look at places where we had a code comment.
			if len(co) > 0 {
				t := findTags(co)
				for _, tg := range t {
					found := false
					for _, tt := range tags {
						if tt == tg {
							found = true
						}
					}
					if !found {
						tags = append(tags, tg)
					}
				}
			}
		}
	}

	return tags, nil
}

// Read contents of a Go file up to the package declaration. This can be used
// to find the the build tags.
func readGoContents(fp string) ([]byte, error) {
	f, err := os.Open(fp)
	defer f.Close()
	if err != nil {
		return []byte{}, err
	}

	var s scanner.Scanner
	s.Init(f)
	var tok rune
	var pos scanner.Position
	for tok != scanner.EOF {
		tok = s.Scan()

		// Getting the token text will skip comments by default.
		tt := s.TokenText()
		// build tags will not be after the package declaration.
		if tt == "package" {
			pos = s.Position
			break
		}
	}

	buf := bytes.NewBufferString("")
	f.Seek(0, 0)
	_, err = io.CopyN(buf, f, int64(pos.Offset))
	if err != nil {
		return []byte{}, err
	}

	return buf.Bytes(), nil
}

// From a byte slice of a Go file find the tags.
func findTags(co []byte) []string {
	p := co
	var tgs []string
	for len(p) > 0 {
		line := p
		if i := bytes.IndexByte(line, '\n'); i >= 0 {
			line, p = line[:i], p[i+1:]
		} else {
			p = p[len(p):]
		}
		line = bytes.TrimSpace(line)
		// Only look at comment lines that are well formed in the Go style
		if bytes.HasPrefix(line, []byte("//")) {
			line = bytes.TrimSpace(line[len([]byte("//")):])
			if len(line) > 0 && line[0] == '+' {
				f := strings.Fields(string(line))

				// We've found a +build tag line.
				if f[0] == "+build" {
					for _, tg := range f[1:] {
						tgs = append(tgs, tg)
					}
				}
			}
		}
	}

	return tgs
}

// Get an OS value that's not the one passed in.
func getOsValue(n string) string {
	for _, o := range osList {
		if o != n {
			return o
		}
	}

	return n
}

func isSupportedOs(n string) bool {
	for _, o := range osList {
		if o == n {
			return true
		}
	}

	return false
}

// Get an Arch value that's not the one passed in.
func getArchValue(n string) string {
	for _, o := range archList {
		if o != n {
			return o
		}
	}

	return n
}

func isSupportedArch(n string) bool {
	for _, o := range archList {
		if o == n {
			return true
		}
	}

	return false
}


================================================
FILE: docs/commands.md
================================================
# Commands

The following are the Glide commands, most of which are to help you manage your workspace.

## glide create (aliased to init)

Initialize a new workspace. Among other things, this creates a `glide.yaml` file
while attempting to guess the packages and versions to put in it. For example,
if your project is using Godep it will use the versions specified there. Glide
is smart enough to scan your codebase and detect the imports being used whether
they are specified with another package manager or not.

    $ glide create
    [INFO]	Generating a YAML configuration file and guessing the dependencies
    [INFO]	Attempting to import from other package managers (use --skip-import to skip)
    [INFO]	Scanning code to look for dependencies
    [INFO]	--> Found reference to github.com/Masterminds/semver
    [INFO]	--> Found reference to github.com/Masterminds/vcs
    [INFO]	--> Found reference to github.com/codegangsta/cli
    [INFO]	--> Found reference to gopkg.in/yaml.v2
    [INFO]	Writing configuration file (glide.yaml)
    [INFO]	Would you like Glide to help you find ways to improve your glide.yaml configuration?
    [INFO]	If you want to revisit this step you can use the config-wizard command at any time.
    [INFO]	Yes (Y) or No (N)?
    n
    [INFO]	You can now edit the glide.yaml file. Consider:
    [INFO]	--> Using ver
Download .txt
gitextract_bnqaxfk6/

├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── LICENSE
├── Makefile
├── README.md
├── action/
│   ├── about.go
│   ├── about_test.go
│   ├── cache.go
│   ├── config_wizard.go
│   ├── create.go
│   ├── debug.go
│   ├── doc.go
│   ├── ensure.go
│   ├── get.go
│   ├── get_test.go
│   ├── import_gb.go
│   ├── import_godep.go
│   ├── import_gom.go
│   ├── import_gpm.go
│   ├── init.go
│   ├── install.go
│   ├── list.go
│   ├── list_test.go
│   ├── mirrors.go
│   ├── name.go
│   ├── name_test.go
│   ├── no_vendor.go
│   ├── no_vendor_test.go
│   ├── plugin.go
│   ├── plugin_test.go
│   ├── project_info.go
│   ├── rebuild.go
│   ├── rebuild_test.go
│   ├── remove.go
│   ├── tree.go
│   └── update.go
├── appveyor.yml
├── cache/
│   ├── cache.go
│   ├── cache_test.go
│   ├── global_lock.go
│   └── memory.go
├── cfg/
│   ├── cfg.go
│   ├── config.go
│   ├── config_test.go
│   ├── lock.go
│   └── lock_test.go
├── dependency/
│   ├── resolver.go
│   ├── resolver_test.go
│   └── scan.go
├── docs/
│   ├── commands.md
│   ├── example-glide.yaml
│   ├── faq.md
│   ├── getting-started.md
│   ├── glide-plugin-example
│   ├── glide.lock.md
│   ├── glide.yaml.md
│   ├── importing.md
│   ├── index.md
│   ├── plugins.md
│   ├── resolving-imports.md
│   ├── vendor.md
│   └── versions.md
├── gb/
│   ├── gb.go
│   └── manifest.go
├── glide.go
├── glide.yaml
├── glide_test.go
├── godep/
│   ├── godep.go
│   └── strip/
│       ├── strip.go
│       └── strip_test.go
├── gom/
│   ├── gom.go
│   └── parser.go
├── gpm/
│   └── gpm.go
├── importer/
│   └── importer.go
├── mirrors/
│   ├── cfg.go
│   ├── mirrors.go
│   └── mirrors_test.go
├── mkdocs.yml
├── msg/
│   ├── msg.go
│   ├── out.go
│   └── out_windows.go
├── path/
│   ├── path.go
│   ├── path_test.go
│   ├── strip.go
│   ├── strip_int_test.go
│   ├── strip_test.go
│   └── winbug.go
├── repo/
│   ├── installer.go
│   ├── repo.go
│   ├── semver.go
│   ├── set_reference.go
│   ├── tracker.go
│   ├── tracker_test.go
│   └── vcs.go
├── testdata/
│   ├── name/
│   │   ├── glide.yaml
│   │   └── glide2.yaml
│   ├── nv/
│   │   ├── a/
│   │   │   └── foo.empty
│   │   ├── b/
│   │   │   └── foo.empty
│   │   └── c/
│   │       └── foo.empty
│   ├── path/
│   │   ├── a/
│   │   │   ├── b/
│   │   │   │   └── c/
│   │   │   │       └── placeholder.empty
│   │   │   └── glide.yaml
│   │   └── x/
│   │       ├── glide.yaml
│   │       ├── symlinked_vendor/
│   │       │   └── placeholder.empty
│   │       └── y/
│   │           └── z/
│   │               └── placeholder.empty
│   ├── plugin/
│   │   ├── glide-hello
│   │   └── glide-hello-win.bat
│   └── rebuild/
│       └── glide.yaml
├── tree/
│   ├── tree.go
│   └── tree_test.go
├── util/
│   ├── normalizename_test.go
│   ├── util.go
│   └── util_test.go
└── vendor/
    ├── github.com/
    │   ├── Masterminds/
    │   │   ├── semver/
    │   │   │   ├── .travis.yml
    │   │   │   ├── CHANGELOG.md
    │   │   │   ├── LICENSE.txt
    │   │   │   ├── Makefile
    │   │   │   ├── README.md
    │   │   │   ├── appveyor.yml
    │   │   │   ├── benchmark_test.go
    │   │   │   ├── collection.go
    │   │   │   ├── collection_test.go
    │   │   │   ├── constraints.go
    │   │   │   ├── constraints_test.go
    │   │   │   ├── doc.go
    │   │   │   ├── version.go
    │   │   │   └── version_test.go
    │   │   └── vcs/
    │   │       ├── .gitignore
    │   │       ├── .travis.yml
    │   │       ├── CHANGELOG.md
    │   │       ├── LICENSE.txt
    │   │       ├── Makefile
    │   │       ├── README.md
    │   │       ├── appveyor.yml
    │   │       ├── bzr.go
    │   │       ├── bzr_test.go
    │   │       ├── errors.go
    │   │       ├── errors_test.go
    │   │       ├── git.go
    │   │       ├── git_test.go
    │   │       ├── glide.yaml
    │   │       ├── hg.go
    │   │       ├── hg_test.go
    │   │       ├── repo.go
    │   │       ├── repo_test.go
    │   │       ├── svn.go
    │   │       ├── svn_test.go
    │   │       ├── vcs_local_lookup.go
    │   │       ├── vcs_remote_lookup.go
    │   │       └── vcs_remote_lookup_test.go
    │   ├── codegangsta/
    │   │   └── cli/
    │   │       ├── .flake8
    │   │       ├── .gitignore
    │   │       ├── .travis.yml
    │   │       ├── CHANGELOG.md
    │   │       ├── LICENSE
    │   │       ├── README.md
    │   │       ├── altsrc/
    │   │       │   ├── altsrc.go
    │   │       │   ├── flag.go
    │   │       │   ├── flag_generated.go
    │   │       │   ├── flag_test.go
    │   │       │   ├── helpers_test.go
    │   │       │   ├── input_source_context.go
    │   │       │   ├── map_input_source.go
    │   │       │   ├── toml_command_test.go
    │   │       │   ├── toml_file_loader.go
    │   │       │   ├── yaml_command_test.go
    │   │       │   └── yaml_file_loader.go
    │   │       ├── app.go
    │   │       ├── app_test.go
    │   │       ├── appveyor.yml
    │   │       ├── autocomplete/
    │   │       │   ├── bash_autocomplete
    │   │       │   └── zsh_autocomplete
    │   │       ├── category.go
    │   │       ├── cli.go
    │   │       ├── command.go
    │   │       ├── command_test.go
    │   │       ├── context.go
    │   │       ├── context_test.go
    │   │       ├── errors.go
    │   │       ├── errors_test.go
    │   │       ├── flag-types.json
    │   │       ├── flag.go
    │   │       ├── flag_generated.go
    │   │       ├── flag_test.go
    │   │       ├── funcs.go
    │   │       ├── generate-flag-types
    │   │       ├── help.go
    │   │       ├── help_test.go
    │   │       ├── helpers_test.go
    │   │       ├── helpers_unix_test.go
    │   │       ├── helpers_windows_test.go
    │   │       └── runtests
    │   └── mitchellh/
    │       └── go-homedir/
    │           ├── LICENSE
    │           ├── README.md
    │           ├── homedir.go
    │           └── homedir_test.go
    └── gopkg.in/
        └── yaml.v2/
            ├── .travis.yml
            ├── LICENSE
            ├── LICENSE.libyaml
            ├── README.md
            ├── apic.go
            ├── decode.go
            ├── decode_test.go
            ├── emitterc.go
            ├── encode.go
            ├── encode_test.go
            ├── example_embedded_test.go
            ├── parserc.go
            ├── readerc.go
            ├── resolve.go
            ├── scannerc.go
            ├── sorter.go
            ├── suite_test.go
            ├── writerc.go
            ├── yaml.go
            ├── yamlh.go
            └── yamlprivateh.go
Download .txt
SYMBOL INDEX (1739 symbols across 144 files)

FILE: action/about.go
  constant aboutMessage (line 5) | aboutMessage = `
  function About (line 41) | func About() {

FILE: action/about_test.go
  function TestAbout (line 10) | func TestAbout(t *testing.T) {

FILE: action/cache.go
  function CacheClear (line 11) | func CacheClear() {

FILE: action/config_wizard.go
  function ConfigWizard (line 20) | func ConfigWizard(base string) {
  function wizardSugOnce (line 178) | func wizardSugOnce() {
  function wizardOnce (line 187) | func wizardOnce(name string) (bool, bool, interface{}) {
  function wizardSetOnce (line 191) | func wizardSetOnce(name string, prompt bool, val interface{}) {
  function wizardRemember (line 197) | func wizardRemember() bool {
  function wizardAskRange (line 203) | func wizardAskRange(ver *semver.Version, d *cfg.Dependency) string {
  function wizardAskCurrent (line 227) | func wizardAskCurrent(cur string, d *cfg.Dependency) bool {
  function wizardAskLatest (line 234) | func wizardAskLatest(latest string, d *cfg.Dependency) bool {
  function wizardLookInto (line 241) | func wizardLookInto(d *cfg.Dependency) bool {
  function wizardFindVersions (line 255) | func wizardFindVersions(d *cfg.Dependency) {
  function findCurrentBranch (line 340) | func findCurrentBranch(repo vcs.Repo) string {

FILE: action/create.go
  function Create (line 28) | func Create(base string, skipImport, nonInteractive bool) {
  function guardYAML (line 63) | func guardYAML(filename string) {
  function guessDeps (line 76) | func guessDeps(base string, skipImport bool) *cfg.Config {
  function guessImportDeps (line 189) | func guessImportDeps(base string, config *cfg.Config) {
  function guessImportGodep (line 220) | func guessImportGodep(dir string) ([]*cfg.Dependency, bool) {
  function guessImportGPM (line 229) | func guessImportGPM(dir string) ([]*cfg.Dependency, bool) {
  function guessImportGB (line 238) | func guessImportGB(dir string) ([]*cfg.Dependency, bool) {

FILE: action/debug.go
  function Debug (line 8) | func Debug(on bool) {
  function Quiet (line 13) | func Quiet(on bool) {
  function NoColor (line 18) | func NoColor(on bool) {

FILE: action/ensure.go
  function EnsureConfig (line 21) | func EnsureConfig() *cfg.Config {
  function EnsureGoVendor (line 69) | func EnsureGoVendor() {
  function EnsureVendorDir (line 116) | func EnsureVendorDir() {
  function EnsureGopath (line 131) | func EnsureGopath() string {
  function goExecutable (line 157) | func goExecutable() string {

FILE: action/get.go
  function Get (line 21) | func Get(names []string, installer *repo.Installer, insecure, skipRecurs...
  function writeLock (line 101) | func writeLock(conf, confcopy *cfg.Config, base string) {
  function addPkgsToConfig (line 124) | func addPkgsToConfig(conf *cfg.Config, names []string, insecure, nonInte...
  function getWizard (line 227) | func getWizard(dep *cfg.Dependency) {

FILE: action/get_test.go
  function TestAddPkgsToConfig (line 11) | func TestAddPkgsToConfig(t *testing.T) {

FILE: action/import_gb.go
  function ImportGB (line 11) | func ImportGB(dest string) {
  function appendImports (line 25) | func appendImports(deps []*cfg.Dependency, config *cfg.Config) {
  function writeConfigToFileOrStdout (line 38) | func writeConfigToFileOrStdout(config *cfg.Config, dest string) {

FILE: action/import_godep.go
  function ImportGodep (line 9) | func ImportGodep(dest string) {

FILE: action/import_gom.go
  function ImportGom (line 9) | func ImportGom(dest string) {

FILE: action/import_gpm.go
  function ImportGPM (line 9) | func ImportGPM(dest string) {

FILE: action/init.go
  function Init (line 8) | func Init(yaml, home string) {

FILE: action/install.go
  function Install (line 14) | func Install(installer *repo.Installer, stripVendor bool) {

FILE: action/list.go
  function List (line 18) | func List(basedir string, deep bool, format string) {
  type PackageList (line 55) | type PackageList struct
  constant textFormat (line 62) | textFormat       = "text"
  constant jsonFormat (line 63) | jsonFormat       = "json"
  constant jsonPrettyFormat (line 64) | jsonPrettyFormat = "json-pretty"
  function outputList (line 67) | func outputList(l PackageList, format string) {

FILE: action/list_test.go
  function TestList (line 11) | func TestList(t *testing.T) {

FILE: action/mirrors.go
  function MirrorsList (line 13) | func MirrorsList() error {
  function MirrorsSet (line 46) | func MirrorsSet(o, r, v string) error {
  function MirrorsRemove (line 101) | func MirrorsRemove(k string) error {

FILE: action/name.go
  function Name (line 8) | func Name() {

FILE: action/name_test.go
  function TestName (line 11) | func TestName(t *testing.T) {

FILE: action/no_vendor.go
  function NoVendor (line 16) | func NoVendor(path string, onlyGo, suffix bool) {
  function noVend (line 37) | func noVend(path string, onlyGo, suffix bool) ([]string, error) {
  function hasGoSource (line 89) | func hasGoSource(dirs []string, suffix bool) []string {
  function isVend (line 123) | func isVend(fi os.FileInfo) bool {
  function exclude (line 130) | func exclude(fi os.FileInfo) bool {
  function isGoish (line 141) | func isGoish(fi os.FileInfo) bool {

FILE: action/no_vendor_test.go
  function TestNoVendor (line 9) | func TestNoVendor(t *testing.T) {

FILE: action/plugin.go
  function Plugin (line 14) | func Plugin(command string, args []string) {

FILE: action/plugin_test.go
  function TestPlugin (line 11) | func TestPlugin(t *testing.T) {

FILE: action/project_info.go
  function Info (line 10) | func Info(format string) {

FILE: action/rebuild.go
  function Rebuild (line 20) | func Rebuild() {
  function buildDep (line 43) | func buildDep(dep *cfg.Dependency, vpath string) error {
  function resolvePackages (line 64) | func resolvePackages(vpath, pkg, subpkg string) ([]string, error) {
  function buildPaths (line 81) | func buildPaths(paths []string) error {
  function buildPath (line 91) | func buildPath(path string) error {

FILE: action/rebuild_test.go
  function TestRebuild (line 10) | func TestRebuild(t *testing.T) {

FILE: action/remove.go
  function Remove (line 12) | func Remove(packages []string, inst *repo.Installer) {
  function rmDeps (line 54) | func rmDeps(pkgs []string, deps []*cfg.Dependency) []*cfg.Dependency {

FILE: action/tree.go
  function Tree (line 13) | func Tree(basedir string, showcore bool) {

FILE: action/update.go
  function Update (line 15) | func Update(installer *repo.Installer, skipRecursive, stripVendor bool) {

FILE: cache/cache.go
  function Setup (line 57) | func Setup() {
  function SetupReset (line 83) | func SetupReset() {
  function Location (line 88) | func Location() string {
  function Key (line 100) | func Key(repo string) (string, error) {
  type RepoInfo (line 145) | type RepoInfo struct
  function SaveRepoData (line 151) | func SaveRepoData(key string, data RepoInfo) error {
  function RepoData (line 180) | func RepoData(key string) (*RepoInfo, error) {
  function Lock (line 203) | func Lock(name string) {
  function Unlock (line 216) | func Unlock(name string) {

FILE: cache/cache_test.go
  function TestKey (line 5) | func TestKey(t *testing.T) {

FILE: cache/global_lock.go
  function SystemLock (line 22) | func SystemLock() error {
  function SystemUnlock (line 36) | func SystemUnlock() {
  type lockdata (line 43) | type lockdata struct
  function writeLock (line 52) | func writeLock() error {
  function startLock (line 74) | func startLock() error {
  function waitOnLock (line 116) | func waitOnLock() error {

FILE: cache/memory.go
  function MemPut (line 17) | func MemPut(name, version string) {
  function MemTouched (line 22) | func MemTouched(name string) bool {
  function MemTouch (line 27) | func MemTouch(name string) {
  function MemLatest (line 33) | func MemLatest(name string) string {
  function MemSetCurrent (line 38) | func MemSetCurrent(name, version string) {
  function MemCurrent (line 43) | func MemCurrent(name string) string {
  type memCache (line 48) | type memCache struct
    method setCurrent (line 65) | func (m *memCache) setCurrent(name, version string) {
    method current (line 84) | func (m *memCache) current(name string) string {
    method put (line 90) | func (m *memCache) put(name, version string) {
    method touch (line 123) | func (m *memCache) touch(name string) {
    method touched (line 129) | func (m *memCache) touched(name string) bool {
    method getLatest (line 135) | func (m *memCache) getLatest(name string) string {
  function newMemCache (line 56) | func newMemCache() *memCache {

FILE: cfg/config.go
  type Config (line 18) | type Config struct
    method Marshal (line 80) | func (c *Config) Marshal() ([]byte, error) {
    method UnmarshalYAML (line 89) | func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
    method MarshalYAML (line 111) | func (c *Config) MarshalYAML() (interface{}, error) {
    method HasDependency (line 138) | func (c *Config) HasDependency(name string) bool {
    method HasIgnore (line 153) | func (c *Config) HasIgnore(name string) bool {
    method HasExclude (line 167) | func (c *Config) HasExclude(ex string) bool {
    method Clone (line 179) | func (c *Config) Clone() *Config {
    method WriteFile (line 197) | func (c *Config) WriteFile(glidepath string) error {
    method DeDupe (line 206) | func (c *Config) DeDupe() error {
    method AddImport (line 267) | func (c *Config) AddImport(deps ...*Dependency) error {
    method Hash (line 279) | func (c *Config) Hash() (string, error) {
  type cf (line 60) | type cf struct
  function ConfigFromYaml (line 73) | func ConfigFromYaml(yml []byte) (*Config, error) {
  type Dependencies (line 291) | type Dependencies
    method Get (line 294) | func (d Dependencies) Get(name string) *Dependency {
    method Has (line 304) | func (d Dependencies) Has(name string) bool {
    method Remove (line 314) | func (d Dependencies) Remove(name string) Dependencies {
    method Clone (line 331) | func (d Dependencies) Clone() Dependencies {
    method DeDupe (line 340) | func (d Dependencies) DeDupe() (Dependencies, error) {
  type Dependency (line 371) | type Dependency struct
    method UnmarshalYAML (line 408) | func (d *Dependency) UnmarshalYAML(unmarshal func(interface{}) error) ...
    method MarshalYAML (line 446) | func (d *Dependency) MarshalYAML() (interface{}, error) {
    method Remote (line 465) | func (d *Dependency) Remote() string {
    method Vcs (line 483) | func (d *Dependency) Vcs() string {
    method GetRepo (line 502) | func (d *Dependency) GetRepo(dest string) (vcs.Repo, error) {
    method Clone (line 531) | func (d *Dependency) Clone() *Dependency {
    method HasSubpackage (line 545) | func (d *Dependency) HasSubpackage(sub string) bool {
  type dep (line 383) | type dep struct
  function DependencyFromLock (line 395) | func DependencyFromLock(lock *Lock) *Dependency {
  type Owners (line 557) | type Owners
    method Clone (line 560) | func (o Owners) Clone() Owners {
  type Owner (line 571) | type Owner struct
    method Clone (line 584) | func (o *Owner) Clone() *Owner {
  function stringArrayDeDupe (line 592) | func stringArrayDeDupe(s []string, items ...string) []string {
  function filterVcsType (line 608) | func filterVcsType(vcs string) string {
  function normalizeSlash (line 623) | func normalizeSlash(k string) string {

FILE: cfg/config_test.go
  function TestManualConfigFromYaml (line 44) | func TestManualConfigFromYaml(t *testing.T) {
  function TestClone (line 93) | func TestClone(t *testing.T) {
  function TestConfigFromYaml (line 114) | func TestConfigFromYaml(t *testing.T) {
  function TestHasDependency (line 125) | func TestHasDependency(t *testing.T) {
  function TestOwners (line 140) | func TestOwners(t *testing.T) {

FILE: cfg/lock.go
  type Lockfile (line 15) | type Lockfile struct
    method Marshal (line 30) | func (lf *Lockfile) Marshal() ([]byte, error) {
    method MarshalYAML (line 40) | func (lf *Lockfile) MarshalYAML() (interface{}, error) {
    method WriteFile (line 75) | func (lf *Lockfile) WriteFile(lockpath string) error {
    method Clone (line 84) | func (lf *Lockfile) Clone() *Lockfile {
    method Fingerprint (line 96) | func (lf *Lockfile) Fingerprint() ([32]byte, error) {
  function LockfileFromYaml (line 23) | func LockfileFromYaml(yml []byte) (*Lockfile, error) {
  function ReadLockFile (line 110) | func ReadLockFile(lockpath string) (*Lockfile, error) {
  type Locks (line 123) | type Locks
    method Clone (line 126) | func (l Locks) Clone() Locks {
    method Len (line 136) | func (l Locks) Len() int {
    method Less (line 142) | func (l Locks) Less(i, j int) bool {
    method Swap (line 152) | func (l Locks) Swap(i, j int) {
  type Lock (line 157) | type Lock struct
    method Clone (line 168) | func (l *Lock) Clone() *Lock {
  function LockFromDependency (line 181) | func LockFromDependency(dep *Dependency) *Lock {
  function NewLockfile (line 194) | func NewLockfile(ds, tds Dependencies, hash string) (*Lockfile, error) {
  function LockfileFromMap (line 231) | func LockfileFromMap(ds map[string]*Dependency, hash string) *Lockfile {

FILE: cfg/lock_test.go
  function TestSortLocks (line 9) | func TestSortLocks(t *testing.T) {
  constant inputSubpkgYaml (line 37) | inputSubpkgYaml = `
  constant expectSubpkgYaml (line 67) | expectSubpkgYaml = `
  function TestSortSubpackages (line 98) | func TestSortSubpackages(t *testing.T) {

FILE: dependency/resolver.go
  type MissingPackageHandler (line 24) | type MissingPackageHandler interface
  type DefaultMissingPackageHandler (line 67) | type DefaultMissingPackageHandler struct
    method NotFound (line 76) | func (d *DefaultMissingPackageHandler) NotFound(pkg string, addTest bo...
    method OnGopath (line 83) | func (d *DefaultMissingPackageHandler) OnGopath(pkg string, addTest bo...
    method InVendor (line 90) | func (d *DefaultMissingPackageHandler) InVendor(pkg string, addTest bo...
    method PkgPath (line 96) | func (d *DefaultMissingPackageHandler) PkgPath(pkg string) string {
  type VersionHandler (line 108) | type VersionHandler interface
  type DefaultVersionHandler (line 123) | type DefaultVersionHandler struct
    method Process (line 126) | func (d *DefaultVersionHandler) Process(pkg string) error {
    method SetVersion (line 132) | func (d *DefaultVersionHandler) SetVersion(pkg string, testDep bool) e...
  type Resolver (line 146) | type Resolver struct
    method Resolve (line 234) | func (r *Resolver) Resolve(pkg, basepath string) ([]string, error) {
    method ResolveLocal (line 262) | func (r *Resolver) ResolveLocal(deep bool) ([]string, []string, error) {
    method ResolveAll (line 419) | func (r *Resolver) ResolveAll(deps []*cfg.Dependency, addTest bool) ([...
    method Stripv (line 430) | func (r *Resolver) Stripv(str string) string {
    method vpath (line 435) | func (r *Resolver) vpath(str string) string {
    method resolveImports (line 456) | func (r *Resolver) resolveImports(queue *list.List, testDeps, addTest ...
    method resolveList (line 677) | func (r *Resolver) resolveList(queue *list.List, testDeps, addTest boo...
    method queueUnseen (line 773) | func (r *Resolver) queueUnseen(pkg string, queue *list.List, testDeps,...
    method imports (line 806) | func (r *Resolver) imports(pkg string, testDeps, addTest bool) ([]stri...
    method FindPkg (line 988) | func (r *Resolver) FindPkg(name string) *PkgInfo {
  function NewResolver (line 181) | func NewResolver(basedir string) (*Resolver, error) {
  function dirHasPrefix (line 248) | func dirHasPrefix(dir, prefix string) bool {
  function sliceToQueue (line 913) | func sliceToQueue(deps []*cfg.Dependency, basepath string) *list.List {
  type PkgLoc (line 935) | type PkgLoc
  constant LocUnknown (line 939) | LocUnknown PkgLoc = iota
  constant LocLocal (line 941) | LocLocal
  constant LocVendor (line 943) | LocVendor
  constant LocGopath (line 945) | LocGopath
  constant LocGoroot (line 947) | LocGoroot
  constant LocCgo (line 949) | LocCgo
  constant LocAppengine (line 954) | LocAppengine
  constant LocRelative (line 956) | LocRelative
  type PkgInfo (line 960) | type PkgInfo struct
  function pkgExists (line 1085) | func pkgExists(path string) bool {
  function isLink (line 1091) | func isLink(fi os.FileInfo) bool {
  function IsSrcDir (line 1099) | func IsSrcDir(fi os.FileInfo) bool {
  function srcDir (line 1103) | func srcDir(fi os.FileInfo) bool {
  function checkForBasedirSymlink (line 1125) | func checkForBasedirSymlink(basedir string) (string, error) {
  function dedupeStrings (line 1139) | func dedupeStrings(s1, s2 []string) (r []string) {
  function osDirNotFound (line 1169) | func osDirNotFound(err error, p string) bool {

FILE: dependency/resolver_test.go
  function TestResolveLocalShallow (line 12) | func TestResolveLocalShallow(t *testing.T) {
  function TestResolveLocalDeep (line 44) | func TestResolveLocalDeep(t *testing.T) {
  function TestResolve (line 62) | func TestResolve(t *testing.T) {
  function TestResolveAll (line 85) | func TestResolveAll(t *testing.T) {

FILE: dependency/scan.go
  function init (line 18) | func init() {
  function IterativeScan (line 38) | func IterativeScan(path string) ([]string, []string, error) {
  function readBuildTags (line 157) | func readBuildTags(p string) ([]string, error) {
  function readGoContents (line 208) | func readGoContents(fp string) ([]byte, error) {
  function findTags (line 242) | func findTags(co []byte) []string {
  function getOsValue (line 273) | func getOsValue(n string) string {
  function isSupportedOs (line 283) | func isSupportedOs(n string) bool {
  function getArchValue (line 294) | func getArchValue(n string) string {
  function isSupportedArch (line 304) | func isSupportedArch(n string) bool {

FILE: gb/gb.go
  function Has (line 15) | func Has(dir string) bool {
  function Parse (line 22) | func Parse(dir string) ([]*cfg.Dependency, error) {

FILE: gb/manifest.go
  type Manifest (line 9) | type Manifest struct
  type Dependency (line 15) | type Dependency struct

FILE: glide.go
  constant usage (line 39) | usage = `Vendor Package Management for your Go projects.
  function main (line 59) | func main() {
  function commands (line 117) | func commands() []cli.Command {
  function startup (line 829) | func startup(c *cli.Context) error {
  function shutdown (line 839) | func shutdown(c *cli.Context) error {
  function glidefile (line 848) | func glidefile(c *cli.Context) string {

FILE: glide_test.go
  function TestCommandsNonEmpty (line 7) | func TestCommandsNonEmpty(t *testing.T) {

FILE: godep/godep.go
  type Godeps (line 25) | type Godeps struct
  type Dependency (line 36) | type Dependency struct
  function Has (line 43) | func Has(dir string) bool {
  function Parse (line 52) | func Parse(dir string) ([]*cfg.Dependency, error) {
  function RemoveGodepSubpackages (line 104) | func RemoveGodepSubpackages(c *cfg.Config) *cfg.Config {

FILE: godep/strip/strip.go
  function GodepWorkspace (line 29) | func GodepWorkspace(v string) error {
  function stripGodepWorkspaceHandler (line 56) | func stripGodepWorkspaceHandler(path string, info os.FileInfo, err error...
  function rewriteGodepfilesHandler (line 86) | func rewriteGodepfilesHandler(path string, info os.FileInfo, err error) ...
  function rewriteGodepImport (line 151) | func rewriteGodepImport(n string) string {

FILE: godep/strip/strip_test.go
  function TestRewriteGodepImport (line 5) | func TestRewriteGodepImport(t *testing.T) {

FILE: gom/gom.go
  function Has (line 15) | func Has(dir string) bool {
  function Parse (line 22) | func Parse(dir string) ([]*cfg.Dependency, error) {
  function stringsContain (line 93) | func stringsContain(v []string, key string) bool {
  function toStringSlice (line 102) | func toStringSlice(v interface{}) []string {

FILE: gom/parser.go
  function unquote (line 24) | func unquote(name string) string {
  function parseOptions (line 34) | func parseOptions(line string, options map[string]interface{}) {
  type Gom (line 61) | type Gom struct
  function parseGomfile (line 66) | func parseGomfile(filename string) ([]Gom, error) {

FILE: gpm/gpm.go
  function Has (line 18) | func Has(dir string) bool {
  function Parse (line 25) | func Parse(dir string) ([]*cfg.Dependency, error) {
  function parseGodepsLine (line 61) | func parseGodepsLine(line string) ([]string, bool) {

FILE: importer/importer.go
  function Import (line 19) | func Import(path string) (bool, []*cfg.Dependency, error) {
  type Importer (line 24) | type Importer interface
  type DefaultImporter (line 34) | type DefaultImporter struct
    method Import (line 37) | func (d *DefaultImporter) Import(path string) (bool, []*cfg.Dependency...

FILE: mirrors/cfg.go
  type Mirrors (line 12) | type Mirrors struct
    method Marshal (line 19) | func (ov *Mirrors) Marshal() ([]byte, error) {
    method WriteFile (line 31) | func (ov *Mirrors) WriteFile(opath string) error {
    method MarshalYAML (line 61) | func (ov *Mirrors) MarshalYAML() (interface{}, error) {
  function ReadMirrorsFile (line 40) | func ReadMirrorsFile(opath string) (*Mirrors, error) {
  function FromYaml (line 53) | func FromYaml(yml []byte) (*Mirrors, error) {
  type MirrorRepos (line 69) | type MirrorRepos
    method Len (line 73) | func (o MirrorRepos) Len() int {
    method Less (line 79) | func (o MirrorRepos) Less(i, j int) bool {
    method Swap (line 89) | func (o MirrorRepos) Swap(i, j int) {
  type MirrorRepo (line 94) | type MirrorRepo struct

FILE: mirrors/mirrors.go
  function init (line 15) | func init() {
  type mirror (line 19) | type mirror struct
  function Get (line 27) | func Get(k string) (bool, string, string) {
  function Load (line 37) | func Load() error {

FILE: mirrors/mirrors_test.go
  function TestSortMirrors (line 22) | func TestSortMirrors(t *testing.T) {

FILE: msg/msg.go
  type Messenger (line 16) | type Messenger struct
    method Info (line 67) | func (m *Messenger) Info(msg string, args ...interface{}) {
    method Debug (line 81) | func (m *Messenger) Debug(msg string, args ...interface{}) {
    method Warn (line 95) | func (m *Messenger) Warn(msg string, args ...interface{}) {
    method Err (line 106) | func (m *Messenger) Err(msg string, args ...interface{}) {
    method Die (line 120) | func (m *Messenger) Die(msg string, args ...interface{}) {
    method ExitCode (line 140) | func (m *Messenger) ExitCode(e int) int {
    method Msg (line 159) | func (m *Messenger) Msg(msg string, args ...interface{}) {
    method Puts (line 203) | func (m *Messenger) Puts(msg string, args ...interface{}) {
    method Print (line 225) | func (m *Messenger) Print(msg string) {
    method HasErrored (line 245) | func (m *Messenger) HasErrored() bool {
    method PromptUntil (line 266) | func (m *Messenger) PromptUntil(opts []string) (string, error) {
    method PromptUntilYorN (line 293) | func (m *Messenger) PromptUntilYorN() bool {
  function NewMessenger (line 48) | func NewMessenger() *Messenger {
  function Info (line 76) | func Info(msg string, args ...interface{}) {
  function Debug (line 90) | func Debug(msg string, args ...interface{}) {
  function Warn (line 101) | func Warn(msg string, args ...interface{}) {
  function Err (line 113) | func Err(msg string, args ...interface{}) {
  function Die (line 131) | func Die(msg string, args ...interface{}) {
  function ExitCode (line 153) | func ExitCode(e int) int {
  function Msg (line 194) | func Msg(msg string, args ...interface{}) {
  function Puts (line 218) | func Puts(msg string, args ...interface{}) {
  function Print (line 237) | func Print(msg string) {
  function HasErrored (line 253) | func HasErrored() bool {
  function Color (line 259) | func Color(code, msg string) string {
  function PromptUntil (line 286) | func PromptUntil(opts []string) (string, error) {
  function PromptUntilYorN (line 310) | func PromptUntilYorN() bool {

FILE: msg/out.go
  constant Blue (line 10) | Blue   = "0;34"
  constant Red (line 11) | Red    = "0;31"
  constant Green (line 12) | Green  = "0;32"
  constant Yellow (line 13) | Yellow = "0;33"
  constant Cyan (line 14) | Cyan   = "0;36"
  constant Pink (line 15) | Pink   = "1;35"
  method Color (line 23) | func (m *Messenger) Color(code, msg string) string {

FILE: msg/out_windows.go
  constant Blue (line 9) | Blue   = ""
  constant Red (line 10) | Red    = ""
  constant Green (line 11) | Green  = ""
  constant Yellow (line 12) | Yellow = ""
  constant Cyan (line 13) | Cyan   = ""
  constant Pink (line 14) | Pink   = ""
  method Color (line 19) | func (m *Messenger) Color(code, msg string) string {

FILE: path/path.go
  constant DefaultGlideFile (line 19) | DefaultGlideFile = "glide.yaml"
  constant LockFile (line 40) | LockFile = "glide.lock"
  function init (line 42) | func init() {
  function Home (line 63) | func Home() string {
  function SetHome (line 83) | func SetHome(h string) {
  function Vendor (line 91) | func Vendor() (string, error) {
  function Glide (line 132) | func Glide() (string, error) {
  function GlideWD (line 152) | func GlideWD(dir string) (string, error) {
  function Gopath (line 180) | func Gopath() string {
  function Gopaths (line 190) | func Gopaths() []string {
  function Basepath (line 200) | func Basepath() string {
  function StripBasepath (line 209) | func StripBasepath(p string) string {
  function IsLink (line 215) | func IsLink(fi os.FileInfo) bool {
  function HasLock (line 220) | func HasLock(basepath string) bool {
  function IsDirectoryEmpty (line 226) | func IsDirectoryEmpty(dir string) (bool, error) {
  function CopyDir (line 248) | func CopyDir(source string, dest string) error {
  function CopyFile (line 295) | func CopyFile(source string, dest string) error {

FILE: path/path_test.go
  constant testdata (line 10) | testdata = "../testdata/path"
  function TestGlideWD (line 12) | func TestGlideWD(t *testing.T) {
  function TestVendor (line 32) | func TestVendor(t *testing.T) {
  function TestGlide (line 72) | func TestGlide(t *testing.T) {
  function TestCustomRemoveAll (line 90) | func TestCustomRemoveAll(t *testing.T) {

FILE: path/strip.go
  function getWalkFunction (line 11) | func getWalkFunction(searchPath string, removeAll func(p string) error) ...
  function StripVendor (line 36) | func StripVendor() error {

FILE: path/strip_int_test.go
  function generateTestDirectory (line 10) | func generateTestDirectory(t *testing.T) string {
  function TestNestVendorNoError (line 37) | func TestNestVendorNoError(t *testing.T) {

FILE: path/strip_test.go
  type mockFileInfo (line 12) | type mockFileInfo struct
    method Name (line 17) | func (mfi *mockFileInfo) Name() string {
    method Size (line 21) | func (mfi *mockFileInfo) Size() int64 {
    method Mode (line 25) | func (mfi *mockFileInfo) Mode() os.FileMode {
    method ModTime (line 29) | func (mfi *mockFileInfo) ModTime() time.Time {
    method IsDir (line 33) | func (mfi *mockFileInfo) IsDir() bool {
    method Sys (line 37) | func (mfi *mockFileInfo) Sys() interface{} {
  type removeAll (line 41) | type removeAll struct
    method removeAll (line 46) | func (rah *removeAll) removeAll(p string) error {
  function TestWalkFunction (line 51) | func TestWalkFunction(t *testing.T) {

FILE: path/winbug.go
  function getExitCode (line 17) | func getExitCode(err error) int {
  constant winErrorFileNotFound (line 30) | winErrorFileNotFound = 2
  constant winErrorPathNotFound (line 31) | winErrorPathNotFound = 3
  function CustomRemoveAll (line 42) | func CustomRemoveAll(p string) error {
  function CustomRename (line 70) | func CustomRename(o, n string) error {
  function detectWsl (line 99) | func detectWsl() bool {

FILE: repo/installer.go
  type Installer (line 27) | type Installer struct
    method VendorPath (line 58) | func (i *Installer) VendorPath() string {
    method Install (line 72) | func (i *Installer) Install(lock *cfg.Lockfile, conf *cfg.Config) (*cf...
    method Checkout (line 111) | func (i *Installer) Checkout(conf *cfg.Config) error {
    method Update (line 133) | func (i *Installer) Update(conf *cfg.Config) error {
    method Export (line 248) | func (i *Installer) Export(conf *cfg.Config) error {
    method List (line 425) | func (i *Installer) List(conf *cfg.Config) []*cfg.Dependency {
  function NewInstaller (line 51) | func NewInstaller() *Installer {
  function fixcle (line 399) | func fixcle(from, to string, terr *os.LinkError) error {
  function LazyConcurrentUpdate (line 467) | func LazyConcurrentUpdate(deps []*cfg.Dependency, i *Installer, c *cfg.C...
  function ConcurrentUpdate (line 510) | func ConcurrentUpdate(deps []*cfg.Dependency, i *Installer, c *cfg.Confi...
  function allPackages (line 567) | func allPackages(deps []*cfg.Dependency, res *dependency.Resolver, addTe...
  type MissingPackageHandler (line 593) | type MissingPackageHandler struct
    method NotFound (line 603) | func (m *MissingPackageHandler) NotFound(pkg string, addTest bool) (bo...
    method OnGopath (line 615) | func (m *MissingPackageHandler) OnGopath(pkg string, addTest bool) (bo...
    method InVendor (line 627) | func (m *MissingPackageHandler) InVendor(pkg string, addTest bool) err...
    method PkgPath (line 633) | func (m *MissingPackageHandler) PkgPath(pkg string) string {
    method fetchToCache (line 663) | func (m *MissingPackageHandler) fetchToCache(pkg string, addTest bool)...
  type VersionHandler (line 694) | type VersionHandler struct
    method Process (line 713) | func (d *VersionHandler) Process(pkg string) (e error) {
    method SetVersion (line 750) | func (d *VersionHandler) SetVersion(pkg string, addTest bool) (e error) {
    method pkgPath (line 823) | func (d *VersionHandler) pkgPath(pkg string) string {
  function determineDependency (line 853) | func determineDependency(v, dep *cfg.Dependency, dest, req string) *cfg....
  function singleWarn (line 967) | func singleWarn(ft string, v ...interface{}) {
  function singleInfo (line 976) | func singleInfo(ft string, v ...interface{}) {
  type importCache (line 985) | type importCache struct
    method Get (line 997) | func (i *importCache) Get(name string) (*cfg.Dependency, string) {
    method Add (line 1006) | func (i *importCache) Add(name string, dep *cfg.Dependency, root strin...
  function newImportCache (line 990) | func newImportCache() *importCache {
  function displayCommitInfo (line 1017) | func displayCommitInfo(repo vcs.Repo, dep *cfg.Dependency) {
  function commitSubjectFirstLine (line 1032) | func commitSubjectFirstLine(sub string) string {

FILE: repo/semver.go
  function getSemVers (line 10) | func getSemVers(refs []string) []*semver.Version {
  function getAllVcsRefs (line 23) | func getAllVcsRefs(repo vcs.Repo) ([]string, error) {

FILE: repo/set_reference.go
  function SetReference (line 14) | func SetReference(conf *cfg.Config, resolveTest bool) error {

FILE: repo/tracker.go
  type UpdateTracker (line 9) | type UpdateTracker struct
    method Add (line 23) | func (u *UpdateTracker) Add(name string) {
    method Check (line 30) | func (u *UpdateTracker) Check(name string) bool {
    method Remove (line 38) | func (u *UpdateTracker) Remove(name string) {
  function NewUpdateTracker (line 16) | func NewUpdateTracker() *UpdateTracker {

FILE: repo/tracker_test.go
  function TestUpdateTracker (line 5) | func TestUpdateTracker(t *testing.T) {

FILE: repo/vcs.go
  function VcsUpdate (line 24) | func VcsUpdate(dep *cfg.Dependency, force bool, updated *UpdateTracker) ...
  function VcsVersion (line 149) | func VcsVersion(dep *cfg.Dependency) error {
  function VcsGet (line 254) | func VcsGet(dep *cfg.Dependency) error {
  function filterArchOs (line 300) | func filterArchOs(dep *cfg.Dependency) bool {
  function isBranch (line 331) | func isBranch(branch string, repo v.Repo) (bool, error) {
  function defaultBranch (line 347) | func defaultBranch(repo v.Repo) string {
  function findCurrentBranch (line 457) | func findCurrentBranch(repo v.Repo) string {
  function envForDir (line 476) | func envForDir(dir string) []string {
  function mergeEnvLists (line 481) | func mergeEnvLists(in, out []string) []string {

FILE: tree/tree.go
  function Display (line 18) | func Display(b *util.BuildCtxt, basedir, myName string, level int, core ...
  function walkDeps (line 45) | func walkDeps(b *util.BuildCtxt, base, myName string) []string {
  function findPkg (line 101) | func findPkg(b *util.BuildCtxt, name, cwd string) *dependency.PkgInfo {
  function copyList (line 189) | func copyList(l *list.List) *list.List {
  function findInList (line 198) | func findInList(n string, l *list.List) bool {

FILE: tree/tree_test.go
  function TestFindInTree (line 19) | func TestFindInTree(t *testing.T) {

FILE: util/normalizename_test.go
  function TestNormalizeName (line 7) | func TestNormalizeName(t *testing.T) {

FILE: util/util.go
  function init (line 29) | func init() {
  function toSlash (line 46) | func toSlash(v string) string {
  function GetRootFromPackage (line 55) | func GetRootFromPackage(pkg string) string {
  function getRootFromGoGet (line 83) | func getRootFromGoGet(pkg string) string {
  function checkRemotePackageCache (line 125) | func checkRemotePackageCache(pkg string) (string, bool) {
  function addToRemotePackageCache (line 135) | func addToRemotePackageCache(pkg, v string) {
  function parseImportFromBody (line 139) | func parseImportFromBody(ur *url.URL, r io.ReadCloser) (u string, err er...
  function charsetReader (line 186) | func charsetReader(charset string, input io.Reader) (io.Reader, error) {
  function attrValue (line 195) | func attrValue(attrs []xml.Attr, name string) string {
  type vcsInfo (line 204) | type vcsInfo struct
  type BuildCtxt (line 257) | type BuildCtxt struct
    method PackageName (line 264) | func (b *BuildCtxt) PackageName(base string) string {
  function GetBuildContext (line 288) | func GetBuildContext() (*BuildCtxt, error) {
  function NormalizeName (line 314) | func NormalizeName(name string) (string, string) {

FILE: util/util_test.go
  function TestGetRootFromPackage (line 5) | func TestGetRootFromPackage(t *testing.T) {

FILE: vendor/github.com/Masterminds/semver/benchmark_test.go
  function benchNewConstraint (line 11) | func benchNewConstraint(c string, b *testing.B) {
  function BenchmarkNewConstraintUnary (line 17) | func BenchmarkNewConstraintUnary(b *testing.B) {
  function BenchmarkNewConstraintTilde (line 21) | func BenchmarkNewConstraintTilde(b *testing.B) {
  function BenchmarkNewConstraintCaret (line 25) | func BenchmarkNewConstraintCaret(b *testing.B) {
  function BenchmarkNewConstraintWildcard (line 29) | func BenchmarkNewConstraintWildcard(b *testing.B) {
  function BenchmarkNewConstraintRange (line 33) | func BenchmarkNewConstraintRange(b *testing.B) {
  function BenchmarkNewConstraintUnion (line 37) | func BenchmarkNewConstraintUnion(b *testing.B) {
  function benchCheckVersion (line 43) | func benchCheckVersion(c, v string, b *testing.B) {
  function BenchmarkCheckVersionUnary (line 52) | func BenchmarkCheckVersionUnary(b *testing.B) {
  function BenchmarkCheckVersionTilde (line 56) | func BenchmarkCheckVersionTilde(b *testing.B) {
  function BenchmarkCheckVersionCaret (line 60) | func BenchmarkCheckVersionCaret(b *testing.B) {
  function BenchmarkCheckVersionWildcard (line 64) | func BenchmarkCheckVersionWildcard(b *testing.B) {
  function BenchmarkCheckVersionRange (line 68) | func BenchmarkCheckVersionRange(b *testing.B) {
  function BenchmarkCheckVersionUnion (line 72) | func BenchmarkCheckVersionUnion(b *testing.B) {
  function benchValidateVersion (line 76) | func benchValidateVersion(c, v string, b *testing.B) {
  function BenchmarkValidateVersionUnary (line 87) | func BenchmarkValidateVersionUnary(b *testing.B) {
  function BenchmarkValidateVersionUnaryFail (line 91) | func BenchmarkValidateVersionUnaryFail(b *testing.B) {
  function BenchmarkValidateVersionTilde (line 95) | func BenchmarkValidateVersionTilde(b *testing.B) {
  function BenchmarkValidateVersionTildeFail (line 99) | func BenchmarkValidateVersionTildeFail(b *testing.B) {
  function BenchmarkValidateVersionCaret (line 103) | func BenchmarkValidateVersionCaret(b *testing.B) {
  function BenchmarkValidateVersionCaretFail (line 107) | func BenchmarkValidateVersionCaretFail(b *testing.B) {
  function BenchmarkValidateVersionWildcard (line 111) | func BenchmarkValidateVersionWildcard(b *testing.B) {
  function BenchmarkValidateVersionWildcardFail (line 115) | func BenchmarkValidateVersionWildcardFail(b *testing.B) {
  function BenchmarkValidateVersionRange (line 119) | func BenchmarkValidateVersionRange(b *testing.B) {
  function BenchmarkValidateVersionRangeFail (line 123) | func BenchmarkValidateVersionRangeFail(b *testing.B) {
  function BenchmarkValidateVersionUnion (line 127) | func BenchmarkValidateVersionUnion(b *testing.B) {
  function BenchmarkValidateVersionUnionFail (line 131) | func BenchmarkValidateVersionUnionFail(b *testing.B) {
  function benchNewVersion (line 137) | func benchNewVersion(v string, b *testing.B) {
  function BenchmarkNewVersionSimple (line 143) | func BenchmarkNewVersionSimple(b *testing.B) {
  function BenchmarkNewVersionPre (line 147) | func BenchmarkNewVersionPre(b *testing.B) {
  function BenchmarkNewVersionMeta (line 151) | func BenchmarkNewVersionMeta(b *testing.B) {
  function BenchmarkNewVersionMetaDash (line 155) | func BenchmarkNewVersionMetaDash(b *testing.B) {

FILE: vendor/github.com/Masterminds/semver/collection.go
  type Collection (line 6) | type Collection
    method Len (line 10) | func (c Collection) Len() int {
    method Less (line 16) | func (c Collection) Less(i, j int) bool {
    method Swap (line 22) | func (c Collection) Swap(i, j int) {

FILE: vendor/github.com/Masterminds/semver/collection_test.go
  function TestCollection (line 9) | func TestCollection(t *testing.T) {

FILE: vendor/github.com/Masterminds/semver/constraints.go
  type Constraints (line 12) | type Constraints struct
    method Check (line 44) | func (cs Constraints) Check(v *Version) bool {
    method Validate (line 65) | func (cs Constraints) Validate(v *Version) (bool, []error) {
  function NewConstraint (line 18) | func NewConstraint(c string) (*Constraints, error) {
  function init (line 90) | func init() {
  type constraint (line 137) | type constraint struct
    method check (line 158) | func (c *constraint) check(v *Version) bool {
  type cfunc (line 162) | type cfunc
  function parseConstraint (line 164) | func parseConstraint(c string) (*constraint, error) {
  function constraintNotEqual (line 209) | func constraintNotEqual(v *Version, c *constraint) bool {
  function constraintGreaterThan (line 234) | func constraintGreaterThan(v *Version, c *constraint) bool {
  function constraintLessThan (line 252) | func constraintLessThan(v *Version, c *constraint) bool {
  function constraintGreaterThanEqual (line 273) | func constraintGreaterThanEqual(v *Version, c *constraint) bool {
  function constraintLessThanEqual (line 290) | func constraintLessThanEqual(v *Version, c *constraint) bool {
  function constraintTilde (line 317) | func constraintTilde(v *Version, c *constraint) bool {
  function constraintTildeOrEqual (line 349) | func constraintTildeOrEqual(v *Version, c *constraint) bool {
  function constraintCaret (line 371) | func constraintCaret(v *Version, c *constraint) bool {
  constant cvRegex (line 392) | cvRegex string = `v?([0-9|x|X|\*]+)(\.[0-9|x|X|\*]+)?(\.[0-9|x|X|\*]+)?` +
  function isX (line 396) | func isX(x string) bool {
  function rewriteRange (line 405) | func rewriteRange(i string) string {
  function isNonZero (line 420) | func isNonZero(v *Version) bool {

FILE: vendor/github.com/Masterminds/semver/constraints_test.go
  function TestParseConstraint (line 8) | func TestParseConstraint(t *testing.T) {
  function TestConstraintCheck (line 53) | func TestConstraintCheck(t *testing.T) {
  function TestNewConstraint (line 102) | func TestNewConstraint(t *testing.T) {
  function TestConstraintsCheck (line 147) | func TestConstraintsCheck(t *testing.T) {
  function TestRewriteRange (line 251) | func TestRewriteRange(t *testing.T) {
  function TestIsX (line 270) | func TestIsX(t *testing.T) {
  function TestConstraintsValidate (line 290) | func TestConstraintsValidate(t *testing.T) {

FILE: vendor/github.com/Masterminds/semver/version.go
  constant SemVerRegex (line 31) | SemVerRegex string = `v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` +
  constant ValidPrerelease (line 37) | ValidPrerelease string = `^([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*)`
  type Version (line 40) | type Version struct
    method String (line 110) | func (v *Version) String() string {
    method Original (line 125) | func (v *Version) Original() string {
    method Major (line 130) | func (v *Version) Major() int64 {
    method Minor (line 135) | func (v *Version) Minor() int64 {
    method Patch (line 140) | func (v *Version) Patch() int64 {
    method Prerelease (line 145) | func (v *Version) Prerelease() string {
    method Metadata (line 150) | func (v *Version) Metadata() string {
    method originalVPrefix (line 155) | func (v *Version) originalVPrefix() string {
    method IncPatch (line 169) | func (v Version) IncPatch() Version {
    method IncMinor (line 192) | func (v Version) IncMinor() Version {
    method IncMajor (line 208) | func (v Version) IncMajor() Version {
    method SetPrerelease (line 221) | func (v Version) SetPrerelease(prerelease string) (Version, error) {
    method SetMetadata (line 233) | func (v Version) SetMetadata(metadata string) (Version, error) {
    method LessThan (line 244) | func (v *Version) LessThan(o *Version) bool {
    method GreaterThan (line 249) | func (v *Version) GreaterThan(o *Version) bool {
    method Equal (line 256) | func (v *Version) Equal(o *Version) bool {
    method Compare (line 265) | func (v *Version) Compare(o *Version) int {
    method UnmarshalJSON (line 296) | func (v *Version) UnmarshalJSON(b []byte) error {
    method MarshalJSON (line 316) | func (v *Version) MarshalJSON() ([]byte, error) {
  function init (line 47) | func init() {
  function NewVersion (line 54) | func NewVersion(v string) (*Version, error) {
  function MustParse (line 97) | func MustParse(v string) *Version {
  function compareSegment (line 320) | func compareSegment(v, o int64) int {
  function comparePrerelease (line 331) | func comparePrerelease(v, o string) int {
  function comparePrePart (line 374) | func comparePrePart(s, o string) int {

FILE: vendor/github.com/Masterminds/semver/version_test.go
  function TestNewVersion (line 9) | func TestNewVersion(t *testing.T) {
  function TestOriginal (line 52) | func TestOriginal(t *testing.T) {
  function TestParts (line 85) | func TestParts(t *testing.T) {
  function TestString (line 108) | func TestString(t *testing.T) {
  function TestCompare (line 144) | func TestCompare(t *testing.T) {
  function TestLessThan (line 190) | func TestLessThan(t *testing.T) {
  function TestGreaterThan (line 223) | func TestGreaterThan(t *testing.T) {
  function TestEqual (line 261) | func TestEqual(t *testing.T) {
  function TestInc (line 295) | func TestInc(t *testing.T) {
  function TestSetPrerelease (line 352) | func TestSetPrerelease(t *testing.T) {
  function TestSetMetadata (line 397) | func TestSetMetadata(t *testing.T) {
  function TestOriginalVPrefix (line 442) | func TestOriginalVPrefix(t *testing.T) {
  function TestJsonMarshal (line 461) | func TestJsonMarshal(t *testing.T) {
  function TestJsonUnmarshal (line 478) | func TestJsonUnmarshal(t *testing.T) {

FILE: vendor/github.com/Masterminds/vcs/bzr.go
  function NewBzrRepo (line 18) | func NewBzrRepo(remote, local string) (*BzrRepo, error) {
  type BzrRepo (line 63) | type BzrRepo struct
    method Vcs (line 68) | func (s BzrRepo) Vcs() Type {
    method Get (line 73) | func (s *BzrRepo) Get() error {
    method Init (line 92) | func (s *BzrRepo) Init() error {
    method Update (line 122) | func (s *BzrRepo) Update() error {
    method UpdateVersion (line 135) | func (s *BzrRepo) UpdateVersion(version string) error {
    method Version (line 144) | func (s *BzrRepo) Version() (string, error) {
    method Current (line 158) | func (s *BzrRepo) Current() (string, error) {
    method Date (line 185) | func (s *BzrRepo) Date() (time.Time, error) {
    method CheckLocal (line 198) | func (s *BzrRepo) CheckLocal() bool {
    method Branches (line 210) | func (s *BzrRepo) Branches() ([]string, error) {
    method Tags (line 216) | func (s *BzrRepo) Tags() ([]string, error) {
    method IsReference (line 227) | func (s *BzrRepo) IsReference(r string) bool {
    method IsDirty (line 234) | func (s *BzrRepo) IsDirty() bool {
    method CommitInfo (line 240) | func (s *BzrRepo) CommitInfo(id string) (*CommitInfo, error) {
    method TagsFromCommit (line 283) | func (s *BzrRepo) TagsFromCommit(id string) ([]string, error) {
    method Ping (line 294) | func (s *BzrRepo) Ping() bool {
    method ExportDir (line 318) | func (s *BzrRepo) ExportDir(dir string) error {
    method isUnableToCreateDir (line 330) | func (s *BzrRepo) isUnableToCreateDir(err error) bool {

FILE: vendor/github.com/Masterminds/vcs/bzr_test.go
  function TestBzr (line 19) | func TestBzr(t *testing.T) {
  function TestBzrCheckLocal (line 238) | func TestBzrCheckLocal(t *testing.T) {
  function TestBzrPing (line 265) | func TestBzrPing(t *testing.T) {
  function TestBzrInit (line 298) | func TestBzrInit(t *testing.T) {

FILE: vendor/github.com/Masterminds/vcs/errors.go
  type RemoteError (line 62) | type RemoteError struct
  function NewRemoteError (line 67) | func NewRemoteError(msg string, err error, out string) error {
  type LocalError (line 77) | type LocalError struct
  function NewLocalError (line 82) | func NewLocalError(msg string, err error, out string) error {
  type vcsError (line 91) | type vcsError struct
    method Error (line 98) | func (e *vcsError) Error() string {
    method Original (line 107) | func (e *vcsError) Original() error {
    method Out (line 112) | func (e *vcsError) Out() string {

FILE: vendor/github.com/Masterminds/vcs/errors_test.go
  function TestNewRemoteError (line 8) | func TestNewRemoteError(t *testing.T) {
  function TestNewLocalError (line 23) | func TestNewLocalError(t *testing.T) {

FILE: vendor/github.com/Masterminds/vcs/git.go
  function NewGitRepo (line 17) | func NewGitRepo(remote, local string) (*GitRepo, error) {
  type GitRepo (line 62) | type GitRepo struct
    method Vcs (line 68) | func (s GitRepo) Vcs() Type {
    method Get (line 73) | func (s *GitRepo) Get() error {
    method Init (line 103) | func (s *GitRepo) Init() error {
    method Update (line 133) | func (s *GitRepo) Update() error {
    method UpdateVersion (line 160) | func (s *GitRepo) UpdateVersion(version string) error {
    method defendAgainstSubmodules (line 171) | func (s *GitRepo) defendAgainstSubmodules() error {
    method Version (line 193) | func (s *GitRepo) Version() (string, error) {
    method Current (line 206) | func (s *GitRepo) Current() (string, error) {
    method Date (line 231) | func (s *GitRepo) Date() (time.Time, error) {
    method Branches (line 244) | func (s *GitRepo) Branches() ([]string, error) {
    method Tags (line 254) | func (s *GitRepo) Tags() ([]string, error) {
    method CheckLocal (line 264) | func (s *GitRepo) CheckLocal() bool {
    method IsReference (line 274) | func (s *GitRepo) IsReference(r string) bool {
    method IsDirty (line 289) | func (s *GitRepo) IsDirty() bool {
    method CommitInfo (line 295) | func (s *GitRepo) CommitInfo(id string) (*CommitInfo, error) {
    method TagsFromCommit (line 329) | func (s *GitRepo) TagsFromCommit(id string) ([]string, error) {
    method Ping (line 356) | func (s *GitRepo) Ping() bool {
    method ExportDir (line 390) | func (s *GitRepo) ExportDir(dir string) error {
    method isUnableToCreateDir (line 444) | func (s *GitRepo) isUnableToCreateDir(err error) bool {
  function EscapePathSeparator (line 369) | func EscapePathSeparator(path string) string {
  function isDetachedHead (line 426) | func isDetachedHead(dir string) (bool, error) {

FILE: vendor/github.com/Masterminds/vcs/git_test.go
  function TestGit (line 19) | func TestGit(t *testing.T) {
  function TestGitCheckLocal (line 272) | func TestGitCheckLocal(t *testing.T) {
  function TestGitPing (line 299) | func TestGitPing(t *testing.T) {
  function TestGitInit (line 332) | func TestGitInit(t *testing.T) {
  function TestGitSubmoduleHandling (line 361) | func TestGitSubmoduleHandling(t *testing.T) {
  function TestGitSubmoduleHandling2 (line 486) | func TestGitSubmoduleHandling2(t *testing.T) {

FILE: vendor/github.com/Masterminds/vcs/hg.go
  function NewHgRepo (line 18) | func NewHgRepo(remote, local string) (*HgRepo, error) {
  type HgRepo (line 64) | type HgRepo struct
    method Vcs (line 69) | func (s HgRepo) Vcs() Type {
    method Get (line 74) | func (s *HgRepo) Get() error {
    method Init (line 83) | func (s *HgRepo) Init() error {
    method Update (line 92) | func (s *HgRepo) Update() error {
    method UpdateVersion (line 97) | func (s *HgRepo) UpdateVersion(version string) error {
    method Version (line 114) | func (s *HgRepo) Version() (string, error) {
    method Current (line 137) | func (s *HgRepo) Current() (string, error) {
    method Date (line 171) | func (s *HgRepo) Date() (time.Time, error) {
    method CheckLocal (line 188) | func (s *HgRepo) CheckLocal() bool {
    method Branches (line 197) | func (s *HgRepo) Branches() ([]string, error) {
    method Tags (line 207) | func (s *HgRepo) Tags() ([]string, error) {
    method IsReference (line 218) | func (s *HgRepo) IsReference(r string) bool {
    method IsDirty (line 225) | func (s *HgRepo) IsDirty() bool {
    method CommitInfo (line 231) | func (s *HgRepo) CommitInfo(id string) (*CommitInfo, error) {
    method TagsFromCommit (line 278) | func (s *HgRepo) TagsFromCommit(id string) ([]string, error) {
    method Ping (line 312) | func (s *HgRepo) Ping() bool {
    method ExportDir (line 318) | func (s *HgRepo) ExportDir(dir string) error {

FILE: vendor/github.com/Masterminds/vcs/hg_test.go
  function TestHg (line 18) | func TestHg(t *testing.T) {
  function TestHgCheckLocal (line 241) | func TestHgCheckLocal(t *testing.T) {
  function TestHgPing (line 268) | func TestHgPing(t *testing.T) {
  function TestHgInit (line 301) | func TestHgInit(t *testing.T) {

FILE: vendor/github.com/Masterminds/vcs/repo.go
  function init (line 45) | func init() {
  constant longForm (line 52) | longForm = "2006-01-02 15:04:05 -0700"
  type Type (line 55) | type Type
  constant NoVCS (line 59) | NoVCS Type = ""
  constant Git (line 60) | Git   Type = "git"
  constant Svn (line 61) | Svn   Type = "svn"
  constant Bzr (line 62) | Bzr   Type = "bzr"
  constant Hg (line 63) | Hg    Type = "hg"
  type Repo (line 69) | type Repo interface
  function NewRepo (line 146) | func NewRepo(remote, local string) (Repo, error) {
  type CommitInfo (line 177) | type CommitInfo struct
  type base (line 191) | type base struct
    method log (line 196) | func (b *base) log(v interface{}) {
    method Remote (line 201) | func (b *base) Remote() string {
    method LocalPath (line 206) | func (b *base) LocalPath() string {
    method setRemote (line 210) | func (b *base) setRemote(remote string) {
    method setLocalPath (line 214) | func (b *base) setLocalPath(local string) {
    method run (line 218) | func (b base) run(cmd string, args ...string) ([]byte, error) {
    method CmdFromDir (line 227) | func (b *base) CmdFromDir(cmd string, args ...string) *exec.Cmd {
    method RunFromDir (line 234) | func (b *base) RunFromDir(cmd string, args ...string) ([]byte, error) {
    method referenceList (line 240) | func (b *base) referenceList(c, r string) []string {
  function envForDir (line 250) | func envForDir(dir string) []string {
  function mergeEnvLists (line 255) | func mergeEnvLists(in, out []string) []string {
  function depInstalled (line 270) | func depInstalled(name string) bool {

FILE: vendor/github.com/Masterminds/vcs/repo_test.go
  function ExampleNewRepo (line 10) | func ExampleNewRepo() {
  function TestTypeSwitch (line 34) | func TestTypeSwitch(t *testing.T) {
  function TestDepInstalled (line 64) | func TestDepInstalled(t *testing.T) {

FILE: vendor/github.com/Masterminds/vcs/svn.go
  function NewSvnRepo (line 18) | func NewSvnRepo(remote, local string) (*SvnRepo, error) {
  type SvnRepo (line 64) | type SvnRepo struct
    method Vcs (line 69) | func (s SvnRepo) Vcs() Type {
    method Get (line 76) | func (s *SvnRepo) Get() error {
    method Init (line 91) | func (s *SvnRepo) Init() error {
    method Update (line 118) | func (s *SvnRepo) Update() error {
    method UpdateVersion (line 127) | func (s *SvnRepo) UpdateVersion(version string) error {
    method Version (line 136) | func (s *SvnRepo) Version() (string, error) {
    method Current (line 161) | func (s *SvnRepo) Current() (string, error) {
    method Date (line 180) | func (s *SvnRepo) Date() (time.Time, error) {
    method CheckLocal (line 198) | func (s *SvnRepo) CheckLocal() bool {
    method Tags (line 226) | func (s *SvnRepo) Tags() ([]string, error) {
    method Branches (line 236) | func (s *SvnRepo) Branches() ([]string, error) {
    method IsReference (line 242) | func (s *SvnRepo) IsReference(r string) bool {
    method IsDirty (line 260) | func (s *SvnRepo) IsDirty() bool {
    method CommitInfo (line 266) | func (s *SvnRepo) CommitInfo(id string) (*CommitInfo, error) {
    method TagsFromCommit (line 336) | func (s *SvnRepo) TagsFromCommit(id string) ([]string, error) {
    method Ping (line 343) | func (s *SvnRepo) Ping() bool {
    method ExportDir (line 349) | func (s *SvnRepo) ExportDir(dir string) error {
    method isUnableToCreateDir (line 362) | func (s *SvnRepo) isUnableToCreateDir(err error) bool {
  function detectRemoteFromInfoCommand (line 371) | func detectRemoteFromInfoCommand(infoOut string) (string, error) {

FILE: vendor/github.com/Masterminds/vcs/svn_test.go
  function TestSvn (line 18) | func TestSvn(t *testing.T) {
  function TestSvnCheckLocal (line 241) | func TestSvnCheckLocal(t *testing.T) {
  function TestSvnPing (line 268) | func TestSvnPing(t *testing.T) {
  function TestSvnInit (line 301) | func TestSvnInit(t *testing.T) {

FILE: vendor/github.com/Masterminds/vcs/vcs_local_lookup.go
  function DetectVcsFromFS (line 11) | func DetectVcsFromFS(vcsPath string) (Type, error) {

FILE: vendor/github.com/Masterminds/vcs/vcs_remote_lookup.go
  type vcsInfo (line 15) | type vcsInfo struct
  function init (line 71) | func init() {
  function detectVcsFromRemote (line 81) | func detectVcsFromRemote(vcsURL string) (Type, string, error) {
  function detectVcsFromURL (line 125) | func detectVcsFromURL(vcsURL string) (Type, error) {
  function checkBitbucket (line 229) | func checkBitbucket(i map[string]string, ul *url.URL) (Type, error) {
  function checkURL (line 262) | func checkURL(i map[string]string, u *url.URL) (Type, error) {
  function get (line 266) | func get(url string) ([]byte, error) {
  function expand (line 287) | func expand(match map[string]string, s string) string {
  function parseImportFromBody (line 294) | func parseImportFromBody(ur *url.URL, r io.ReadCloser) (tp Type, u strin...
  function charsetReader (line 350) | func charsetReader(charset string, input io.Reader) (io.Reader, error) {
  function attrValue (line 359) | func attrValue(attrs []xml.Attr, name string) string {

FILE: vendor/github.com/Masterminds/vcs/vcs_remote_lookup_test.go
  function TestVCSLookup (line 12) | func TestVCSLookup(t *testing.T) {
  function TestVCSFileLookup (line 78) | func TestVCSFileLookup(t *testing.T) {

FILE: vendor/github.com/codegangsta/cli/altsrc/flag.go
  type FlagInputSourceExtension (line 14) | type FlagInputSourceExtension interface
  function ApplyInputSourceValues (line 23) | func ApplyInputSourceValues(context *cli.Context, inputSourceContext Inp...
  function InitInputSource (line 40) | func InitInputSource(flags []cli.Flag, createInputSource func() (InputSo...
  function InitInputSourceWithContext (line 54) | func InitInputSourceWithContext(flags []cli.Flag, createInputSource func...
  method ApplyInputSourceValue (line 66) | func (f *GenericFlag) ApplyInputSourceValue(context *cli.Context, isc In...
  method ApplyInputSourceValue (line 85) | func (f *StringSliceFlag) ApplyInputSourceValue(context *cli.Context, is...
  method ApplyInputSourceValue (line 107) | func (f *IntSliceFlag) ApplyInputSourceValue(context *cli.Context, isc I...
  method ApplyInputSourceValue (line 129) | func (f *BoolFlag) ApplyInputSourceValue(context *cli.Context, isc Input...
  method ApplyInputSourceValue (line 147) | func (f *BoolTFlag) ApplyInputSourceValue(context *cli.Context, isc Inpu...
  method ApplyInputSourceValue (line 165) | func (f *StringFlag) ApplyInputSourceValue(context *cli.Context, isc Inp...
  method ApplyInputSourceValue (line 183) | func (f *IntFlag) ApplyInputSourceValue(context *cli.Context, isc InputS...
  method ApplyInputSourceValue (line 201) | func (f *DurationFlag) ApplyInputSourceValue(context *cli.Context, isc I...
  method ApplyInputSourceValue (line 219) | func (f *Float64Flag) ApplyInputSourceValue(context *cli.Context, isc In...
  function isEnvVarSet (line 237) | func isEnvVarSet(envVars string) bool {
  function float64ToString (line 251) | func float64ToString(f float64) string {
  function eachName (line 255) | func eachName(longName string, fn func(string)) {

FILE: vendor/github.com/codegangsta/cli/altsrc/flag_generated.go
  type BoolFlag (line 13) | type BoolFlag struct
    method Apply (line 25) | func (f *BoolFlag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 32) | func (f *BoolFlag) ApplyWithError(set *flag.FlagSet) error {
  function NewBoolFlag (line 19) | func NewBoolFlag(fl cli.BoolFlag) *BoolFlag {
  type BoolTFlag (line 39) | type BoolTFlag struct
    method Apply (line 51) | func (f *BoolTFlag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 58) | func (f *BoolTFlag) ApplyWithError(set *flag.FlagSet) error {
  function NewBoolTFlag (line 45) | func NewBoolTFlag(fl cli.BoolTFlag) *BoolTFlag {
  type DurationFlag (line 65) | type DurationFlag struct
    method Apply (line 77) | func (f *DurationFlag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 84) | func (f *DurationFlag) ApplyWithError(set *flag.FlagSet) error {
  function NewDurationFlag (line 71) | func NewDurationFlag(fl cli.DurationFlag) *DurationFlag {
  type Float64Flag (line 91) | type Float64Flag struct
    method Apply (line 103) | func (f *Float64Flag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 110) | func (f *Float64Flag) ApplyWithError(set *flag.FlagSet) error {
  function NewFloat64Flag (line 97) | func NewFloat64Flag(fl cli.Float64Flag) *Float64Flag {
  type GenericFlag (line 117) | type GenericFlag struct
    method Apply (line 129) | func (f *GenericFlag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 136) | func (f *GenericFlag) ApplyWithError(set *flag.FlagSet) error {
  function NewGenericFlag (line 123) | func NewGenericFlag(fl cli.GenericFlag) *GenericFlag {
  type Int64Flag (line 143) | type Int64Flag struct
    method Apply (line 155) | func (f *Int64Flag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 162) | func (f *Int64Flag) ApplyWithError(set *flag.FlagSet) error {
  function NewInt64Flag (line 149) | func NewInt64Flag(fl cli.Int64Flag) *Int64Flag {
  type IntFlag (line 169) | type IntFlag struct
    method Apply (line 181) | func (f *IntFlag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 188) | func (f *IntFlag) ApplyWithError(set *flag.FlagSet) error {
  function NewIntFlag (line 175) | func NewIntFlag(fl cli.IntFlag) *IntFlag {
  type IntSliceFlag (line 195) | type IntSliceFlag struct
    method Apply (line 207) | func (f *IntSliceFlag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 214) | func (f *IntSliceFlag) ApplyWithError(set *flag.FlagSet) error {
  function NewIntSliceFlag (line 201) | func NewIntSliceFlag(fl cli.IntSliceFlag) *IntSliceFlag {
  type Int64SliceFlag (line 221) | type Int64SliceFlag struct
    method Apply (line 233) | func (f *Int64SliceFlag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 240) | func (f *Int64SliceFlag) ApplyWithError(set *flag.FlagSet) error {
  function NewInt64SliceFlag (line 227) | func NewInt64SliceFlag(fl cli.Int64SliceFlag) *Int64SliceFlag {
  type StringFlag (line 247) | type StringFlag struct
    method Apply (line 259) | func (f *StringFlag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 266) | func (f *StringFlag) ApplyWithError(set *flag.FlagSet) error {
  function NewStringFlag (line 253) | func NewStringFlag(fl cli.StringFlag) *StringFlag {
  type StringSliceFlag (line 273) | type StringSliceFlag struct
    method Apply (line 285) | func (f *StringSliceFlag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 292) | func (f *StringSliceFlag) ApplyWithError(set *flag.FlagSet) error {
  function NewStringSliceFlag (line 279) | func NewStringSliceFlag(fl cli.StringSliceFlag) *StringSliceFlag {
  type Uint64Flag (line 299) | type Uint64Flag struct
    method Apply (line 311) | func (f *Uint64Flag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 318) | func (f *Uint64Flag) ApplyWithError(set *flag.FlagSet) error {
  function NewUint64Flag (line 305) | func NewUint64Flag(fl cli.Uint64Flag) *Uint64Flag {
  type UintFlag (line 325) | type UintFlag struct
    method Apply (line 337) | func (f *UintFlag) Apply(set *flag.FlagSet) {
    method ApplyWithError (line 344) | func (f *UintFlag) ApplyWithError(set *flag.FlagSet) error {
  function NewUintFlag (line 331) | func NewUintFlag(fl cli.UintFlag) *UintFlag {

FILE: vendor/github.com/codegangsta/cli/altsrc/flag_test.go
  type testApplyInputSource (line 14) | type testApplyInputSource struct
  function TestGenericApplyInputSourceValue (line 26) | func TestGenericApplyInputSourceValue(t *testing.T) {
  function TestGenericApplyInputSourceMethodContextSet (line 36) | func TestGenericApplyInputSourceMethodContextSet(t *testing.T) {
  function TestGenericApplyInputSourceMethodEnvVarSet (line 47) | func TestGenericApplyInputSourceMethodEnvVarSet(t *testing.T) {
  function TestStringSliceApplyInputSourceValue (line 58) | func TestStringSliceApplyInputSourceValue(t *testing.T) {
  function TestStringSliceApplyInputSourceMethodContextSet (line 67) | func TestStringSliceApplyInputSourceMethodContextSet(t *testing.T) {
  function TestStringSliceApplyInputSourceMethodEnvVarSet (line 77) | func TestStringSliceApplyInputSourceMethodEnvVarSet(t *testing.T) {
  function TestIntSliceApplyInputSourceValue (line 88) | func TestIntSliceApplyInputSourceValue(t *testing.T) {
  function TestIntSliceApplyInputSourceMethodContextSet (line 97) | func TestIntSliceApplyInputSourceMethodContextSet(t *testing.T) {
  function TestIntSliceApplyInputSourceMethodEnvVarSet (line 107) | func TestIntSliceApplyInputSourceMethodEnvVarSet(t *testing.T) {
  function TestBoolApplyInputSourceMethodSet (line 118) | func TestBoolApplyInputSourceMethodSet(t *testing.T) {
  function TestBoolApplyInputSourceMethodContextSet (line 127) | func TestBoolApplyInputSourceMethodContextSet(t *testing.T) {
  function TestBoolApplyInputSourceMethodEnvVarSet (line 137) | func TestBoolApplyInputSourceMethodEnvVarSet(t *testing.T) {
  function TestBoolTApplyInputSourceMethodSet (line 148) | func TestBoolTApplyInputSourceMethodSet(t *testing.T) {
  function TestBoolTApplyInputSourceMethodContextSet (line 157) | func TestBoolTApplyInputSourceMethodContextSet(t *testing.T) {
  function TestBoolTApplyInputSourceMethodEnvVarSet (line 167) | func TestBoolTApplyInputSourceMethodEnvVarSet(t *testing.T) {
  function TestStringApplyInputSourceMethodSet (line 178) | func TestStringApplyInputSourceMethodSet(t *testing.T) {
  function TestStringApplyInputSourceMethodContextSet (line 187) | func TestStringApplyInputSourceMethodContextSet(t *testing.T) {
  function TestStringApplyInputSourceMethodEnvVarSet (line 197) | func TestStringApplyInputSourceMethodEnvVarSet(t *testing.T) {
  function TestIntApplyInputSourceMethodSet (line 208) | func TestIntApplyInputSourceMethodSet(t *testing.T) {
  function TestIntApplyInputSourceMethodContextSet (line 217) | func TestIntApplyInputSourceMethodContextSet(t *testing.T) {
  function TestIntApplyInputSourceMethodEnvVarSet (line 227) | func TestIntApplyInputSourceMethodEnvVarSet(t *testing.T) {
  function TestDurationApplyInputSourceMethodSet (line 238) | func TestDurationApplyInputSourceMethodSet(t *testing.T) {
  function TestDurationApplyInputSourceMethodContextSet (line 247) | func TestDurationApplyInputSourceMethodContextSet(t *testing.T) {
  function TestDurationApplyInputSourceMethodEnvVarSet (line 257) | func TestDurationApplyInputSourceMethodEnvVarSet(t *testing.T) {
  function TestFloat64ApplyInputSourceMethodSet (line 268) | func TestFloat64ApplyInputSourceMethodSet(t *testing.T) {
  function TestFloat64ApplyInputSourceMethodContextSet (line 277) | func TestFloat64ApplyInputSourceMethodContextSet(t *testing.T) {
  function TestFloat64ApplyInputSourceMethodEnvVarSet (line 287) | func TestFloat64ApplyInputSourceMethodEnvVarSet(t *testing.T) {
  function runTest (line 298) | func runTest(t *testing.T, test testApplyInputSource) *cli.Context {
  type Parser (line 320) | type Parser
    method Set (line 322) | func (p *Parser) Set(value string) error {
    method String (line 334) | func (p *Parser) String() string {

FILE: vendor/github.com/codegangsta/cli/altsrc/helpers_test.go
  function expect (line 8) | func expect(t *testing.T, a interface{}, b interface{}) {
  function refute (line 14) | func refute(t *testing.T, a interface{}, b interface{}) {

FILE: vendor/github.com/codegangsta/cli/altsrc/input_source_context.go
  type InputSourceContext (line 11) | type InputSourceContext interface

FILE: vendor/github.com/codegangsta/cli/altsrc/map_input_source.go
  type MapInputSource (line 14) | type MapInputSource struct
    method Int (line 43) | func (fsm *MapInputSource) Int(name string) (int, error) {
    method Duration (line 65) | func (fsm *MapInputSource) Duration(name string) (time.Duration, error) {
    method Float64 (line 87) | func (fsm *MapInputSource) Float64(name string) (float64, error) {
    method String (line 109) | func (fsm *MapInputSource) String(name string) (string, error) {
    method StringSlice (line 131) | func (fsm *MapInputSource) StringSlice(name string) ([]string, error) {
    method IntSlice (line 160) | func (fsm *MapInputSource) IntSlice(name string) ([]int, error) {
    method Generic (line 189) | func (fsm *MapInputSource) Generic(name string) (cli.Generic, error) {
    method Bool (line 211) | func (fsm *MapInputSource) Bool(name string) (bool, error) {
    method BoolT (line 233) | func (fsm *MapInputSource) BoolT(name string) (bool, error) {
  function nestedVal (line 21) | func nestedVal(name string, tree map[interface{}]interface{}) (interface...
  function incorrectTypeForFlagError (line 254) | func incorrectTypeForFlagError(name, expectedTypeName string, value inte...

FILE: vendor/github.com/codegangsta/cli/altsrc/toml_command_test.go
  function TestCommandTomFileTest (line 17) | func TestCommandTomFileTest(t *testing.T) {
  function TestCommandTomlFileTestGlobalEnvVarWins (line 47) | func TestCommandTomlFileTestGlobalEnvVarWins(t *testing.T) {
  function TestCommandTomlFileTestGlobalEnvVarWinsNested (line 81) | func TestCommandTomlFileTestGlobalEnvVarWinsNested(t *testing.T) {
  function TestCommandTomlFileTestSpecifiedFlagWins (line 115) | func TestCommandTomlFileTestSpecifiedFlagWins(t *testing.T) {
  function TestCommandTomlFileTestSpecifiedFlagWinsNested (line 147) | func TestCommandTomlFileTestSpecifiedFlagWinsNested(t *testing.T) {
  function TestCommandTomlFileTestDefaultValueFileWins (line 180) | func TestCommandTomlFileTestDefaultValueFileWins(t *testing.T) {
  function TestCommandTomlFileTestDefaultValueFileWinsNested (line 212) | func TestCommandTomlFileTestDefaultValueFileWinsNested(t *testing.T) {
  function TestCommandTomlFileFlagHasDefaultGlobalEnvTomlSetGlobalEnvWins (line 244) | func TestCommandTomlFileFlagHasDefaultGlobalEnvTomlSetGlobalEnvWins(t *t...
  function TestCommandTomlFileFlagHasDefaultGlobalEnvTomlSetGlobalEnvWinsNested (line 278) | func TestCommandTomlFileFlagHasDefaultGlobalEnvTomlSetGlobalEnvWinsNeste...

FILE: vendor/github.com/codegangsta/cli/altsrc/toml_file_loader.go
  type tomlMap (line 16) | type tomlMap struct
    method UnmarshalTOML (line 69) | func (self *tomlMap) UnmarshalTOML(i interface{}) error {
  function unmarshalMap (line 20) | func unmarshalMap(i interface{}) (ret map[interface{}]interface{}, err e...
  type tomlSourceContext (line 78) | type tomlSourceContext struct
  function NewTomlSourceFromFile (line 83) | func NewTomlSourceFromFile(file string) (InputSourceContext, error) {
  function NewTomlSourceFromFlagFunc (line 93) | func NewTomlSourceFromFlagFunc(flagFileName string) func(context *cli.Co...
  function readCommandToml (line 100) | func readCommandToml(filePath string, container interface{}) (err error) {

FILE: vendor/github.com/codegangsta/cli/altsrc/yaml_command_test.go
  function TestCommandYamlFileTest (line 17) | func TestCommandYamlFileTest(t *testing.T) {
  function TestCommandYamlFileTestGlobalEnvVarWins (line 47) | func TestCommandYamlFileTestGlobalEnvVarWins(t *testing.T) {
  function TestCommandYamlFileTestGlobalEnvVarWinsNested (line 81) | func TestCommandYamlFileTestGlobalEnvVarWinsNested(t *testing.T) {
  function TestCommandYamlFileTestSpecifiedFlagWins (line 116) | func TestCommandYamlFileTestSpecifiedFlagWins(t *testing.T) {
  function TestCommandYamlFileTestSpecifiedFlagWinsNested (line 148) | func TestCommandYamlFileTestSpecifiedFlagWinsNested(t *testing.T) {
  function TestCommandYamlFileTestDefaultValueFileWins (line 181) | func TestCommandYamlFileTestDefaultValueFileWins(t *testing.T) {
  function TestCommandYamlFileTestDefaultValueFileWinsNested (line 213) | func TestCommandYamlFileTestDefaultValueFileWinsNested(t *testing.T) {
  function TestCommandYamlFileFlagHasDefaultGlobalEnvYamlSetGlobalEnvWins (line 246) | func TestCommandYamlFileFlagHasDefaultGlobalEnvYamlSetGlobalEnvWins(t *t...
  function TestCommandYamlFileFlagHasDefaultGlobalEnvYamlSetGlobalEnvWinsNested (line 280) | func TestCommandYamlFileFlagHasDefaultGlobalEnvYamlSetGlobalEnvWinsNeste...

FILE: vendor/github.com/codegangsta/cli/altsrc/yaml_file_loader.go
  type yamlSourceContext (line 22) | type yamlSourceContext struct
  function NewYamlSourceFromFile (line 27) | func NewYamlSourceFromFile(file string) (InputSourceContext, error) {
  function NewYamlSourceFromFlagFunc (line 39) | func NewYamlSourceFromFlagFunc(flagFileName string) func(context *cli.Co...
  function readCommandYaml (line 46) | func readCommandYaml(filePath string, container interface{}) (err error) {
  function loadDataFrom (line 61) | func loadDataFrom(filePath string) ([]byte, error) {

FILE: vendor/github.com/codegangsta/cli/app.go
  type App (line 27) | type App struct
    method Setup (line 127) | func (a *App) Setup() {
    method Run (line 175) | func (a *App) Run(arguments []string) (err error) {
    method RunAndExitOnError (line 275) | func (a *App) RunAndExitOnError() {
    method RunAsSubcommand (line 284) | func (a *App) RunAsSubcommand(ctx *Context) (err error) {
    method Command (line 391) | func (a *App) Command(name string) *Command {
    method Categories (line 402) | func (a *App) Categories() CommandCategories {
    method VisibleCategories (line 408) | func (a *App) VisibleCategories() []*CommandCategory {
    method VisibleCommands (line 426) | func (a *App) VisibleCommands() []Command {
    method VisibleFlags (line 437) | func (a *App) VisibleFlags() []Flag {
    method hasFlag (line 441) | func (a *App) hasFlag(flag Flag) bool {
    method errWriter (line 451) | func (a *App) errWriter() io.Writer {
    method appendFlag (line 461) | func (a *App) appendFlag(flag Flag) {
  function compileTime (line 100) | func compileTime() time.Time {
  function NewApp (line 110) | func NewApp() *App {
  type Author (line 468) | type Author struct
    method String (line 474) | func (a Author) String() string {
  function HandleAction (line 486) | func HandleAction(action interface{}, context *Context) (err error) {

FILE: vendor/github.com/codegangsta/cli/app_test.go
  function init (line 24) | func init() {
  type opCounts (line 29) | type opCounts struct
  function ExampleApp_Run (line 33) | func ExampleApp_Run() {
  function ExampleApp_Run_subcommand (line 55) | func ExampleApp_Run_subcommand() {
  function ExampleApp_Run_appHelp (line 93) | func ExampleApp_Run_appHelp() {
  function ExampleApp_Run_commandHelp (line 148) | func ExampleApp_Run_commandHelp() {
  function ExampleApp_Run_noAction (line 181) | func ExampleApp_Run_noAction() {
  function ExampleApp_Run_subcommandNoAction (line 200) | func ExampleApp_Run_subcommandNoAction() {
  function ExampleApp_Run_bashComplete (line 224) | func ExampleApp_Run_bashComplete() {
  function TestApp_Run (line 261) | func TestApp_Run(t *testing.T) {
  function TestApp_Command (line 289) | func TestApp_Command(t *testing.T) {
  function TestApp_Setup_defaultsWriter (line 303) | func TestApp_Setup_defaultsWriter(t *testing.T) {
  function TestApp_CommandWithArgBeforeFlags (line 309) | func TestApp_CommandWithArgBeforeFlags(t *testing.T) {
  function TestApp_RunAsSubcommandParseFlags (line 332) | func TestApp_RunAsSubcommandParseFlags(t *testing.T) {
  function TestApp_RunAsSubCommandIncorrectUsage (line 359) | func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) {
  function TestApp_CommandWithFlagBeforeTerminator (line 376) | func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) {
  function TestApp_CommandWithDash (line 402) | func TestApp_CommandWithDash(t *testing.T) {
  function TestApp_CommandWithNoFlagBeforeTerminator (line 421) | func TestApp_CommandWithNoFlagBeforeTerminator(t *testing.T) {
  function TestApp_VisibleCommands (line 441) | func TestApp_VisibleCommands(t *testing.T) {
  function TestApp_Float64Flag (line 483) | func TestApp_Float64Flag(t *testing.T) {
  function TestApp_ParseSliceFlags (line 499) | func TestApp_ParseSliceFlags(t *testing.T) {
  function TestApp_ParseSliceFlagsWithMissingValue (line 558) | func TestApp_ParseSliceFlagsWithMissingValue(t *testing.T) {
  function TestApp_DefaultStdout (line 591) | func TestApp_DefaultStdout(t *testing.T) {
  type mockWriter (line 599) | type mockWriter struct
    method Write (line 603) | func (fw *mockWriter) Write(p []byte) (n int, err error) {
    method GetWritten (line 613) | func (fw *mockWriter) GetWritten() (b []byte) {
  function TestApp_SetStdout (line 617) | func TestApp_SetStdout(t *testing.T) {
  function TestApp_BeforeFunc (line 635) | func TestApp_BeforeFunc(t *testing.T) {
  function TestApp_AfterFunc (line 727) | func TestApp_AfterFunc(t *testing.T) {
  function TestAppNoHelpFlag (line 795) | func TestAppNoHelpFlag(t *testing.T) {
  function TestAppHelpPrinter (line 812) | func TestAppHelpPrinter(t *testing.T) {
  function TestApp_VersionPrinter (line 831) | func TestApp_VersionPrinter(t *testing.T) {
  function TestApp_CommandNotFound (line 851) | func TestApp_CommandNotFound(t *testing.T) {
  function TestApp_OrderOfOperations (line 878) | func TestApp_OrderOfOperations(t *testing.T) {
  function TestApp_Run_CommandWithSubcommandHasHelpTopic (line 1019) | func TestApp_Run_CommandWithSubcommandHasHelpTopic(t *testing.T) {
  function TestApp_Run_SubcommandFullPath (line 1074) | func TestApp_Run_SubcommandFullPath(t *testing.T) {
  function TestApp_Run_SubcommandHelpName (line 1104) | func TestApp_Run_SubcommandHelpName(t *testing.T) {
  function TestApp_Run_CommandHelpName (line 1135) | func TestApp_Run_CommandHelpName(t *testing.T) {
  function TestApp_Run_CommandSubcommandHelpName (line 1166) | func TestApp_Run_CommandSubcommandHelpName(t *testing.T) {
  function TestApp_Run_Help (line 1197) | func TestApp_Run_Help(t *testing.T) {
  function TestApp_Run_Version (line 1228) | func TestApp_Run_Version(t *testing.T) {
  function TestApp_Run_Categories (line 1260) | func TestApp_Run_Categories(t *testing.T) {
  function TestApp_VisibleCategories (line 1310) | func TestApp_VisibleCategories(t *testing.T) {
  function TestApp_Run_DoesNotOverwriteErrorFromBefore (line 1416) | func TestApp_Run_DoesNotOverwriteErrorFromBefore(t *testing.T) {
  function TestApp_Run_SubcommandDoesNotOverwriteErrorFromBefore (line 1435) | func TestApp_Run_SubcommandDoesNotOverwriteErrorFromBefore(t *testing.T) {
  function TestApp_OnUsageError_WithWrongFlagValue (line 1463) | func TestApp_OnUsageError_WithWrongFlagValue(t *testing.T) {
  function TestApp_OnUsageError_WithWrongFlagValue_ForSubcommand (line 1493) | func TestApp_OnUsageError_WithWrongFlagValue_ForSubcommand(t *testing.T) {
  type customBoolFlag (line 1525) | type customBoolFlag struct
    method String (line 1530) | func (c *customBoolFlag) String() string {
    method GetName (line 1534) | func (c *customBoolFlag) GetName() string {
    method Apply (line 1538) | func (c *customBoolFlag) Apply(set *flag.FlagSet) {
  function TestCustomFlagsUnused (line 1542) | func TestCustomFlagsUnused(t *testing.T) {
  function TestCustomFlagsUsed (line 1552) | func TestCustomFlagsUsed(t *testing.T) {
  function TestCustomHelpVersionFlags (line 1562) | func TestCustomHelpVersionFlags(t *testing.T) {
  function TestHandleAction_WithNonFuncAction (line 1580) | func TestHandleAction_WithNonFuncAction(t *testing.T) {
  function TestHandleAction_WithInvalidFuncSignature (line 1608) | func TestHandleAction_WithInvalidFuncSignature(t *testing.T) {
  function TestHandleAction_WithInvalidFuncReturnSignature (line 1636) | func TestHandleAction_WithInvalidFuncReturnSignature(t *testing.T) {
  function TestHandleAction_WithUnknownPanic (line 1664) | func TestHandleAction_WithUnknownPanic(t *testing.T) {
  function TestShellCompletionForIncompleteFlags (line 1681) | func TestShellCompletionForIncompleteFlags(t *testing.T) {
  function TestHandleActionActuallyWorksWithActions (line 1725) | func TestHandleActionActuallyWorksWithActions(t *testing.T) {

FILE: vendor/github.com/codegangsta/cli/category.go
  type CommandCategories (line 4) | type CommandCategories
    method Less (line 12) | func (c CommandCategories) Less(i, j int) bool {
    method Len (line 16) | func (c CommandCategories) Len() int {
    method Swap (line 20) | func (c CommandCategories) Swap(i, j int) {
    method AddCommand (line 25) | func (c CommandCategories) AddCommand(category string, command Command...
  type CommandCategory (line 7) | type CommandCategory struct
    method VisibleCommands (line 36) | func (c *CommandCategory) VisibleCommands() []Command {

FILE: vendor/github.com/codegangsta/cli/command.go
  type Command (line 11) | type Command struct
    method FullName (line 85) | func (c Command) FullName() string {
    method Run (line 96) | func (c Command) Run(ctx *Context) (err error) {
    method Names (line 219) | func (c Command) Names() []string {
    method HasName (line 230) | func (c Command) HasName(name string) bool {
    method startApp (line 239) | func (c Command) startApp(ctx *Context) error {
    method VisibleFlags (line 302) | func (c Command) VisibleFlags() []Flag {
  type CommandsByName (line 69) | type CommandsByName
    method Len (line 71) | func (c CommandsByName) Len() int {
    method Less (line 75) | func (c CommandsByName) Less(i, j int) bool {
    method Swap (line 79) | func (c CommandsByName) Swap(i, j int) {
  type Commands (line 93) | type Commands

FILE: vendor/github.com/codegangsta/cli/command_test.go
  function TestCommandFlagParsing (line 12) | func TestCommandFlagParsing(t *testing.T) {
  function TestCommand_Run_DoesNotOverwriteErrorFromBefore (line 55) | func TestCommand_Run_DoesNotOverwriteErrorFromBefore(t *testing.T) {
  function TestCommand_Run_BeforeSavesMetadata (line 82) | func TestCommand_Run_BeforeSavesMetadata(t *testing.T) {
  function TestCommand_OnUsageError_hasCommandContext (line 130) | func TestCommand_OnUsageError_hasCommandContext(t *testing.T) {
  function TestCommand_OnUsageError_WithWrongFlagValue (line 154) | func TestCommand_OnUsageError_WithWrongFlagValue(t *testing.T) {
  function TestCommand_OnUsageError_WithSubcommand (line 181) | func TestCommand_OnUsageError_WithSubcommand(t *testing.T) {
  function TestCommand_Run_SubcommandsCanUseErrWriter (line 213) | func TestCommand_Run_SubcommandsCanUseErrWriter(t *testing.T) {

FILE: vendor/github.com/codegangsta/cli/context.go
  type Context (line 15) | type Context struct
    method NumFlags (line 36) | func (c *Context) NumFlags() int {
    method Set (line 41) | func (c *Context) Set(name, value string) error {
    method GlobalSet (line 47) | func (c *Context) GlobalSet(name, value string) error {
    method IsSet (line 53) | func (c *Context) IsSet(name string) bool {
    method GlobalIsSet (line 116) | func (c *Context) GlobalIsSet(name string) bool {
    method FlagNames (line 131) | func (c *Context) FlagNames() (names []string) {
    method GlobalFlagNames (line 143) | func (c *Context) GlobalFlagNames() (names []string) {
    method Parent (line 155) | func (c *Context) Parent() *Context {
    method value (line 160) | func (c *Context) value(name string) interface{} {
    method Args (line 168) | func (c *Context) Args() Args {
    method NArg (line 174) | func (c *Context) NArg() int {
  function NewContext (line 25) | func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context {
  type Args (line 165) | type Args
    method Get (line 179) | func (a Args) Get(n int) string {
    method First (line 187) | func (a Args) First() string {
    method Tail (line 193) | func (a Args) Tail() []string {
    method Present (line 201) | func (a Args) Present() bool {
    method Swap (line 206) | func (a Args) Swap(from, to int) error {
  function globalContext (line 214) | func globalContext(ctx *Context) *Context {
  function lookupGlobalFlagSet (line 227) | func lookupGlobalFlagSet(name string, ctx *Context) *flag.FlagSet {
  function copyFlag (line 239) | func copyFlag(name string, ff *flag.Flag, set *flag.FlagSet) {
  function normalizeFlags (line 247) | func normalizeFlags(flags []Flag, set *flag.FlagSet) error {

FILE: vendor/github.com/codegangsta/cli/context_test.go
  function TestNewContext (line 10) | func TestNewContext(t *testing.T) {
  function TestContext_Int (line 40) | func TestContext_Int(t *testing.T) {
  function TestContext_Int64 (line 47) | func TestContext_Int64(t *testing.T) {
  function TestContext_Uint (line 54) | func TestContext_Uint(t *testing.T) {
  function TestContext_Uint64 (line 61) | func TestContext_Uint64(t *testing.T) {
  function TestContext_GlobalInt (line 68) | func TestContext_GlobalInt(t *testing.T) {
  function TestContext_GlobalInt64 (line 76) | func TestContext_GlobalInt64(t *testing.T) {
  function TestContext_Float64 (line 84) | func TestContext_Float64(t *testing.T) {
  function TestContext_GlobalFloat64 (line 91) | func TestContext_GlobalFloat64(t *testing.T) {
  function TestContext_Duration (line 99) | func TestContext_Duration(t *testing.T) {
  function TestContext_String (line 106) | func TestContext_String(t *testing.T) {
  function TestContext_Bool (line 113) | func TestContext_Bool(t *testing.T) {
  function TestContext_BoolT (line 120) | func TestContext_BoolT(t *testing.T) {
  function TestContext_GlobalBool (line 127) | func TestContext_GlobalBool(t *testing.T) {
  function TestContext_GlobalBoolT (line 139) | func TestContext_GlobalBoolT(t *testing.T) {
  function TestContext_Args (line 151) | func TestContext_Args(t *testing.T) {
  function TestContext_NArg (line 160) | func TestContext_NArg(t *testing.T) {
  function TestContext_IsSet (line 168) | func TestContext_IsSet(t *testing.T) {
  function TestContext_IsSet_fromEnv (line 186) | func TestContext_IsSet_fromEnv(t *testing.T) {
  function TestContext_GlobalIsSet (line 230) | func TestContext_GlobalIsSet(t *testing.T) {
  function TestContext_GlobalIsSet_fromEnv (line 251) | func TestContext_GlobalIsSet_fromEnv(t *testing.T) {
  function TestContext_NumFlags (line 304) | func TestContext_NumFlags(t *testing.T) {
  function TestContext_GlobalFlag (line 317) | func TestContext_GlobalFlag(t *testing.T) {
  function TestContext_GlobalFlagsInSubcommands (line 335) | func TestContext_GlobalFlagsInSubcommands(t *testing.T) {
  function TestContext_Set (line 373) | func TestContext_Set(t *testing.T) {
  function TestContext_GlobalSet (line 384) | func TestContext_GlobalSet(t *testing.T) {

FILE: vendor/github.com/codegangsta/cli/errors.go
  type MultiError (line 18) | type MultiError struct
    method Error (line 28) | func (m MultiError) Error() string {
  function NewMultiError (line 23) | func NewMultiError(err ...error) MultiError {
  type ErrorFormatter (line 37) | type ErrorFormatter interface
  type ExitCoder (line 43) | type ExitCoder interface
  type ExitError (line 49) | type ExitError struct
    method Error (line 64) | func (ee *ExitError) Error() string {
    method ExitCode (line 70) | func (ee *ExitError) ExitCode() int {
  function NewExitError (line 55) | func NewExitError(message interface{}, exitCode int) *ExitError {
  function HandleExitCoder (line 78) | func HandleExitCoder(err error) {
  function handleMultiError (line 102) | func handleMultiError(multiErr MultiError) int {

FILE: vendor/github.com/codegangsta/cli/errors_test.go
  function TestHandleExitCoder_nil (line 10) | func TestHandleExitCoder_nil(t *testing.T) {
  function TestHandleExitCoder_ExitCoder (line 29) | func TestHandleExitCoder_ExitCoder(t *testing.T) {
  function TestHandleExitCoder_MultiErrorWithExitCoder (line 48) | func TestHandleExitCoder_MultiErrorWithExitCoder(t *testing.T) {
  type ErrorWithFormat (line 71) | type ErrorWithFormat struct
    method Format (line 79) | func (f *ErrorWithFormat) Format(s fmt.State, verb rune) {
  function NewErrorWithFormat (line 75) | func NewErrorWithFormat(m string) *ErrorWithFormat {
  function TestHandleExitCoder_ErrorWithFormat (line 83) | func TestHandleExitCoder_ErrorWithFormat(t *testing.T) {
  function TestHandleExitCoder_MultiErrorWithFormat (line 105) | func TestHandleExitCoder_MultiErrorWithFormat(t *testing.T) {

FILE: vendor/github.com/codegangsta/cli/flag.go
  constant defaultPlaceholder (line 14) | defaultPlaceholder = "value"
  type FlagsByName (line 41) | type FlagsByName
    method Len (line 43) | func (f FlagsByName) Len() int {
    method Less (line 47) | func (f FlagsByName) Less(i, j int) bool {
    method Swap (line 51) | func (f FlagsByName) Swap(i, j int) {
  type Flag (line 58) | type Flag interface
  type errorableFlag (line 68) | type errorableFlag interface
  function flagSet (line 74) | func flagSet(name string, flags []Flag) (*flag.FlagSet, error) {
  function eachName (line 90) | func eachName(longName string, fn func(string)) {
  type Generic (line 99) | type Generic interface
  method Apply (line 107) | func (f GenericFlag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 113) | func (f GenericFlag) ApplyWithError(set *flag.FlagSet) error {
  type StringSlice (line 135) | type StringSlice
    method Set (line 138) | func (f *StringSlice) Set(value string) error {
    method String (line 144) | func (f *StringSlice) String() string {
    method Value (line 149) | func (f *StringSlice) Value() []string {
    method Get (line 154) | func (f *StringSlice) Get() interface{} {
  method Apply (line 160) | func (f StringSliceFlag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 165) | func (f StringSliceFlag) ApplyWithError(set *flag.FlagSet) error {
  type IntSlice (line 194) | type IntSlice
    method Set (line 197) | func (f *IntSlice) Set(value string) error {
    method String (line 207) | func (f *IntSlice) String() string {
    method Value (line 212) | func (f *IntSlice) Value() []int {
    method Get (line 217) | func (f *IntSlice) Get() interface{} {
  method Apply (line 223) | func (f IntSliceFlag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 228) | func (f IntSliceFlag) ApplyWithError(set *flag.FlagSet) error {
  type Int64Slice (line 257) | type Int64Slice
    method Set (line 260) | func (f *Int64Slice) Set(value string) error {
    method String (line 270) | func (f *Int64Slice) String() string {
    method Value (line 275) | func (f *Int64Slice) Value() []int64 {
    method Get (line 280) | func (f *Int64Slice) Get() interface{} {
  method Apply (line 286) | func (f Int64SliceFlag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 291) | func (f Int64SliceFlag) ApplyWithError(set *flag.FlagSet) error {
  method Apply (line 320) | func (f BoolFlag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 325) | func (f BoolFlag) ApplyWithError(set *flag.FlagSet) error {
  method Apply (line 360) | func (f BoolTFlag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 365) | func (f BoolTFlag) ApplyWithError(set *flag.FlagSet) error {
  method Apply (line 400) | func (f StringFlag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 405) | func (f StringFlag) ApplyWithError(set *flag.FlagSet) error {
  method Apply (line 429) | func (f IntFlag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 434) | func (f IntFlag) ApplyWithError(set *flag.FlagSet) error {
  method Apply (line 462) | func (f Int64Flag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 467) | func (f Int64Flag) ApplyWithError(set *flag.FlagSet) error {
  method Apply (line 496) | func (f UintFlag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 501) | func (f UintFlag) ApplyWithError(set *flag.FlagSet) error {
  method Apply (line 530) | func (f Uint64Flag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 535) | func (f Uint64Flag) ApplyWithError(set *flag.FlagSet) error {
  method Apply (line 564) | func (f DurationFlag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 569) | func (f DurationFlag) ApplyWithError(set *flag.FlagSet) error {
  method Apply (line 598) | func (f Float64Flag) Apply(set *flag.FlagSet) {
  method ApplyWithError (line 603) | func (f Float64Flag) ApplyWithError(set *flag.FlagSet) error {
  function visibleFlags (line 630) | func visibleFlags(fl []Flag) []Flag {
  function prefixFor (line 641) | func prefixFor(name string) (prefix string) {
  function unquoteUsage (line 652) | func unquoteUsage(usage string) (string, string) {
  function prefixedNames (line 668) | func prefixedNames(fullName, placeholder string) string {
  function withEnvHint (line 684) | func withEnvHint(envVar, str string) string {
  function flagValue (line 700) | func flagValue(f Flag) reflect.Value {
  function stringifyFlag (line 708) | func stringifyFlag(f Flag) string {
  function stringifyIntSliceFlag (line 751) | func stringifyIntSliceFlag(f IntSliceFlag) string {
  function stringifyInt64SliceFlag (line 762) | func stringifyInt64SliceFlag(f Int64SliceFlag) string {
  function stringifyStringSliceFlag (line 773) | func stringifyStringSliceFlag(f StringSliceFlag) string {
  function stringifySliceFlag (line 786) | func stringifySliceFlag(usage, name string, defaultVals []string) string {

FILE: vendor/github.com/codegangsta/cli/flag_generated.go
  type BoolFlag (line 12) | type BoolFlag struct
    method String (line 22) | func (f BoolFlag) String() string {
    method GetName (line 27) | func (f BoolFlag) GetName() string {
  method Bool (line 33) | func (c *Context) Bool(name string) bool {
  method GlobalBool (line 39) | func (c *Context) GlobalBool(name string) bool {
  function lookupBool (line 46) | func lookupBool(name string, set *flag.FlagSet) bool {
  type BoolTFlag (line 59) | type BoolTFlag struct
    method String (line 69) | func (f BoolTFlag) String() string {
    method GetName (line 74) | func (f BoolTFlag) GetName() string {
  method BoolT (line 80) | func (c *Context) BoolT(name string) bool {
  method GlobalBoolT (line 86) | func (c *Context) GlobalBoolT(name string) bool {
  function lookupBoolT (line 93) | func lookupBoolT(name string, set *flag.FlagSet) bool {
  type DurationFlag (line 106) | type DurationFlag struct
    method String (line 117) | func (f DurationFlag) String() string {
    method GetName (line 122) | func (f DurationFlag) GetName() string {
  method Duration (line 128) | func (c *Context) Duration(name string) time.Duration {
  method GlobalDuration (line 134) | func (c *Context) GlobalDuration(name string) time.Duration {
  function lookupDuration (line 141) | func lookupDuration(name string, set *flag.FlagSet) time.Duration {
  type Float64Flag (line 154) | type Float64Flag struct
    method String (line 165) | func (f Float64Flag) String() string {
    method GetName (line 170) | func (f Float64Flag) GetName() string {
  method Float64 (line 176) | func (c *Context) Float64(name string) float64 {
  method GlobalFloat64 (line 182) | func (c *Context) GlobalFloat64(name string) float64 {
  function lookupFloat64 (line 189) | func lookupFloat64(name string, set *flag.FlagSet) float64 {
  type GenericFlag (line 202) | type GenericFlag struct
    method String (line 212) | func (f GenericFlag) String() string {
    method GetName (line 217) | func (f GenericFlag) GetName() string {
  method Generic (line 223) | func (c *Context) Generic(name string) interface{} {
  method GlobalGeneric (line 229) | func (c *Context) GlobalGeneric(name string) interface{} {
  function lookupGeneric (line 236) | func lookupGeneric(name string, set *flag.FlagSet) interface{} {
  type Int64Flag (line 249) | type Int64Flag struct
    method String (line 260) | func (f Int64Flag) String() string {
    method GetName (line 265) | func (f Int64Flag) GetName() string {
  method Int64 (line 271) | func (c *Context) Int64(name string) int64 {
  method GlobalInt64 (line 277) | func (c *Context) GlobalInt64(name string) int64 {
  function lookupInt64 (line 284) | func lookupInt64(name string, set *flag.FlagSet) int64 {
  type IntFlag (line 297) | type IntFlag struct
    method String (line 308) | func (f IntFlag) String() string {
    method GetName (line 313) | func (f IntFlag) GetName() string {
  method Int (line 319) | func (c *Context) Int(name string) int {
  method GlobalInt (line 325) | func (c *Context) GlobalInt(name string) int {
  function lookupInt (line 332) | func lookupInt(name string, set *flag.FlagSet) int {
  type IntSliceFlag (line 345) | type IntSliceFlag struct
    method String (line 355) | func (f IntSliceFlag) String() string {
    method GetName (line 360) | func (f IntSliceFlag) GetName() string {
  method IntSlice (line 366) | func (c *Context) IntSlice(name string) []int {
  method GlobalIntSlice (line 372) | func (c *Context) GlobalIntSlice(name string) []int {
  function lookupIntSlice (line 379) | func lookupIntSlice(name string, set *flag.FlagSet) []int {
  type Int64SliceFlag (line 392) | type Int64SliceFlag struct
    method String (line 402) | func (f Int64SliceFlag) String() string {
    method GetName (line 407) | func (f Int64SliceFlag) GetName() string {
  method Int64Slice (line 413) | func (c *Context) Int64Slice(name string) []int64 {
  method GlobalInt64Slice (line 419) | func (c *Context) GlobalInt64Slice(name string) []int64 {
  function lookupInt64Slice (line 426) | func lookupInt64Slice(name string, set *flag.FlagSet) []int64 {
  type StringFlag (line 439) | type StringFlag struct
    method String (line 450) | func (f StringFlag) String() string {
    method GetName (line 455) | func (f StringFlag) GetName() string {
  method String (line 461) | func (c *Context) String(name string) string {
  method GlobalString (line 467) | func (c *Context) GlobalString(name string) string {
  function lookupString (line 474) | func lookupString(name string, set *flag.FlagSet) string {
  type StringSliceFlag (line 487) | type StringSliceFlag struct
    method String (line 497) | func (f StringSliceFlag) String() string {
    method GetName (line 502) | func (f StringSliceFlag) GetName() string {
  method StringSlice (line 508) | func (c *Context) StringSlice(name string) []string {
  method GlobalStringSlice (line 514) | func (c *Context) GlobalStringSlice(name string) []string {
  function lookupStringSlice (line 521) | func lookupStringSlice(name string, set *flag.FlagSet) []string {
  type Uint64Flag (line 534) | type Uint64Flag struct
    method String (line 545) | func (f Uint64Flag) String() string {
    method GetName (line 550) | func (f Uint64Flag) GetName() string {
  method Uint64 (line 556) | func (c *Context) Uint64(name string) uint64 {
  method GlobalUint64 (line 562) | func (c *Context) GlobalUint64(name string) uint64 {
  function lookupUint64 (line 569) | func lookupUint64(name string, set *flag.FlagSet) uint64 {
  type UintFlag (line 582) | type UintFlag struct
    method String (line 593) | func (f UintFlag) String() string {
    method GetName (line 598) | func (f UintFlag) GetName() string {
  method Uint (line 604) | func (c *Context) Uint(name string) uint {
  method GlobalUint (line 610) | func (c *Context) GlobalUint(name string) uint {
  function lookupUint (line 617) | func lookupUint(name string, set *flag.FlagSet) uint {

FILE: vendor/github.com/codegangsta/cli/flag_test.go
  function TestBoolFlagHelpOutput (line 22) | func TestBoolFlagHelpOutput(t *testing.T) {
  function TestFlagsFromEnv (line 33) | func TestFlagsFromEnv(t *testing.T) {
  function TestStringFlagHelpOutput (line 133) | func TestStringFlagHelpOutput(t *testing.T) {
  function TestStringFlagWithEnvVarHelpOutput (line 144) | func TestStringFlagWithEnvVarHelpOutput(t *testing.T) {
  function TestStringSliceFlagHelpOutput (line 188) | func TestStringSliceFlagHelpOutput(t *testing.T) {
  function TestStringSliceFlagWithEnvVarHelpOutput (line 199) | func TestStringSliceFlagWithEnvVarHelpOutput(t *testing.T) {
  function TestIntFlagHelpOutput (line 224) | func TestIntFlagHelpOutput(t *testing.T) {
  function TestIntFlagWithEnvVarHelpOutput (line 235) | func TestIntFlagWithEnvVarHelpOutput(t *testing.T) {
  function TestInt64FlagHelpOutput (line 260) | func TestInt64FlagHelpOutput(t *testing.T) {
  function TestInt64FlagWithEnvVarHelpOutput (line 271) | func TestInt64FlagWithEnvVarHelpOutput(t *testing.T) {
  function TestUintFlagHelpOutput (line 296) | func TestUintFlagHelpOutput(t *testing.T) {
  function TestUintFlagWithEnvVarHelpOutput (line 307) | func TestUintFlagWithEnvVarHelpOutput(t *testing.T) {
  function TestUint64FlagHelpOutput (line 332) | func TestUint64FlagHelpOutput(t *testing.T) {
  function TestUint64FlagWithEnvVarHelpOutput (line 343) | func TestUint64FlagWithEnvVarHelpOutput(t *testing.T) {
  function TestDurationFlagHelpOutput (line 368) | func TestDurationFlagHelpOutput(t *testing.T) {
  function TestDurationFlagWithEnvVarHelpOutput (line 379) | func TestDurationFlagWithEnvVarHelpOutput(t *testing.T) {
  function TestIntSliceFlagHelpOutput (line 411) | func TestIntSliceFlagHelpOutput(t *testing.T) {
  function TestIntSliceFlagWithEnvVarHelpOutput (line 422) | func TestIntSliceFlagWithEnvVarHelpOutput(t *testing.T) {
  function TestInt64SliceFlagHelpOutput (line 454) | func TestInt64SliceFlagHelpOutput(t *testing.T) {
  function TestInt64SliceFlagWithEnvVarHelpOutput (line 465) | func TestInt64SliceFlagWithEnvVarHelpOutput(t *testing.T) {
  function TestFloat64FlagHelpOutput (line 490) | func TestFloat64FlagHelpOutput(t *testing.T) {
  function TestFloat64FlagWithEnvVarHelpOutput (line 501) | func TestFloat64FlagWithEnvVarHelpOutput(t *testing.T) {
  function TestGenericFlagHelpOutput (line 527) | func TestGenericFlagHelpOutput(t *testing.T) {
  function TestGenericFlagWithEnvVarHelpOutput (line 538) | func TestGenericFlagWithEnvVarHelpOutput(t *testing.T) {
  function TestParseMultiString (line 555) | func TestParseMultiString(t *testing.T) {
  function TestParseDestinationString (line 572) | func TestParseDestinationString(t *testing.T) {
  function TestParseMultiStringFromEnv (line 591) | func TestParseMultiStringFromEnv(t *testing.T) {
  function TestParseMultiStringFromEnvCascade (line 610) | func TestParseMultiStringFromEnvCascade(t *testing.T) {
  function TestParseMultiStringSlice (line 629) | func TestParseMultiStringSlice(t *testing.T) {
  function TestParseMultiStringSliceFromEnv (line 646) | func TestParseMultiStringSliceFromEnv(t *testing.T) {
  function TestParseMultiStringSliceFromEnvCascade (line 666) | func TestParseMultiStringSliceFromEnvCascade(t *testing.T) {
  function TestParseMultiInt (line 686) | func TestParseMultiInt(t *testing.T) {
  function TestParseDestinationInt (line 704) | func TestParseDestinationInt(t *testing.T) {
  function TestParseMultiIntFromEnv (line 723) | func TestParseMultiIntFromEnv(t *testing.T) {
  function TestParseMultiIntFromEnvCascade (line 743) | func TestParseMultiIntFromEnvCascade(t *testing.T) {
  function TestParseMultiIntSlice (line 763) | func TestParseMultiIntSlice(t *testing.T) {
  function TestParseMultiIntSliceFromEnv (line 780) | func TestParseMultiIntSliceFromEnv(t *testing.T) {
  function TestParseMultiIntSliceFromEnvCascade (line 800) | func TestParseMultiIntSliceFromEnvCascade(t *testing.T) {
  function TestParseMultiInt64Slice (line 820) | func TestParseMultiInt64Slice(t *testing.T) {
  function TestParseMultiInt64SliceFromEnv (line 837) | func TestParseMultiInt64SliceFromEnv(t *testing.T) {
  function TestParseMultiInt64SliceFromEnvCascade (line 857) | func TestParseMultiInt64SliceFromEnvCascade(t *testing.T) {
  function TestParseMultiFloat64 (line 877) | func TestParseMultiFloat64(t *testing.T) {
  function TestParseDestinationFloat64 (line 895) | func TestParseDestinationFloat64(t *testing.T) {
  function TestParseMultiFloat64FromEnv (line 914) | func TestParseMultiFloat64FromEnv(t *testing.T) {
  function TestParseMultiFloat64FromEnvCascade (line 934) | func TestParseMultiFloat64FromEnvCascade(t *testing.T) {
  function TestParseMultiBool (line 954) | func TestParseMultiBool(t *testing.T) {
  function TestParseDestinationBool (line 972) | func TestParseDestinationBool(t *testing.T) {
  function TestParseMultiBoolFromEnv (line 991) | func TestParseMultiBoolFromEnv(t *testing.T) {
  function TestParseMultiBoolFromEnvCascade (line 1011) | func TestParseMultiBoolFromEnvCascade(t *testing.T) {
  function TestParseBoolTFromEnv (line 1031) | func TestParseBoolTFromEnv(t *testing.T) {
  function TestParseMultiBoolT (line 1063) | func TestParseMultiBoolT(t *testing.T) {
  function TestParseDestinationBoolT (line 1081) | func TestParseDestinationBoolT(t *testing.T) {
  function TestParseMultiBoolTFromEnv (line 1100) | func TestParseMultiBoolTFromEnv(t *testing.T) {
  function TestParseMultiBoolTFromEnvCascade (line 1120) | func TestParseMultiBoolTFromEnvCascade(t *testing.T) {
  type Parser (line 1140) | type Parser
    method Set (line 1142) | func (p *Parser) Set(value string) error {
    method String (line 1154) | func (p *Parser) String() string {
    method Get (line 1158) | func (p *Parser) Get() interface{} {
  function TestParseGeneric (line 1162) | func TestParseGeneric(t *testing.T) {
  function TestParseGenericFromEnv (line 1180) | func TestParseGenericFromEnv(t *testing.T) {
  function TestParseGenericFromEnvCascade (line 1200) | func TestParseGenericFromEnvCascade(t *testing.T) {

FILE: vendor/github.com/codegangsta/cli/funcs.go
  type BashCompleteFunc (line 4) | type BashCompleteFunc
  type BeforeFunc (line 8) | type BeforeFunc
  type AfterFunc (line 12) | type AfterFunc
  type ActionFunc (line 15) | type ActionFunc
  type CommandNotFoundFunc (line 18) | type CommandNotFoundFunc
  type OnUsageErrorFunc (line 24) | type OnUsageErrorFunc
  type FlagStringFunc (line 28) | type FlagStringFunc

FILE: vendor/github.com/codegangsta/cli/help.go
  type helpPrinter (line 113) | type helpPrinter
  type helpPrinterCustom (line 116) | type helpPrinterCustom
  function ShowAppHelpAndExit (line 131) | func ShowAppHelpAndExit(c *Context, exitCode int) {
  function ShowAppHelp (line 137) | func ShowAppHelp(c *Context) (err error) {
  function DefaultAppComplete (line 155) | func DefaultAppComplete(c *Context) {
  function ShowCommandHelpAndExit (line 167) | func ShowCommandHelpAndExit(c *Context, command string, code int) {
  function ShowCommandHelp (line 173) | func ShowCommandHelp(ctx *Context, command string) error {
  function ShowSubcommandHelp (line 200) | func ShowSubcommandHelp(c *Context) error {
  function ShowVersion (line 205) | func ShowVersion(c *Context) {
  function printVersion (line 209) | func printVersion(c *Context) {
  function ShowCompletions (line 214) | func ShowCompletions(c *Context) {
  function ShowCommandCompletions (line 222) | func ShowCommandCompletions(ctx *Context, command string) {
  function printHelpCustom (line 229) | func printHelpCustom(out io.Writer, templ string, data interface{}, cust...
  function printHelp (line 253) | func printHelp(out io.Writer, templ string, data interface{}) {
  function checkVersion (line 257) | func checkVersion(c *Context) bool {
  function checkHelp (line 269) | func checkHelp(c *Context) bool {
  function checkCommandHelp (line 281) | func checkCommandHelp(c *Context, name string) bool {
  function checkSubcommandHelp (line 290) | func checkSubcommandHelp(c *Context) bool {
  function checkShellCompleteFlag (line 299) | func checkShellCompleteFlag(a *App, arguments []string) (bool, []string) {
  function checkCompletions (line 314) | func checkCompletions(c *Context) bool {
  function checkCommandCompletions (line 331) | func checkCommandCompletions(c *Context, name string) bool {

FILE: vendor/github.com/codegangsta/cli/help_test.go
  function Test_ShowAppHelp_NoAuthor (line 12) | func Test_ShowAppHelp_NoAuthor(t *testing.T) {
  function Test_ShowAppHelp_NoVersion (line 26) | func Test_ShowAppHelp_NoVersion(t *testing.T) {
  function Test_ShowAppHelp_HideVersion (line 42) | func Test_ShowAppHelp_HideVersion(t *testing.T) {
  function Test_Help_Custom_Flags (line 58) | func Test_Help_Custom_Flags(t *testing.T) {
  function Test_Version_Custom_Flags (line 88) | func Test_Version_Custom_Flags(t *testing.T) {
  function Test_helpCommand_Action_ErrorIfNoTopic (line 118) | func Test_helpCommand_Action_ErrorIfNoTopic(t *testing.T) {
  function Test_helpCommand_InHelpOutput (line 146) | func Test_helpCommand_InHelpOutput(t *testing.T) {
  function Test_helpSubcommand_Action_ErrorIfNoTopic (line 163) | func Test_helpSubcommand_Action_ErrorIfNoTopic(t *testing.T) {
  function TestShowAppHelp_CommandAliases (line 191) | func TestShowAppHelp_CommandAliases(t *testing.T) {
  function TestShowCommandHelp_CommandAliases (line 213) | func TestShowCommandHelp_CommandAliases(t *testing.T) {
  function TestShowSubcommandHelp_CommandAliases (line 239) | func TestShowSubcommandHelp_CommandAliases(t *testing.T) {
  function TestShowCommandHelp_Customtemplate (line 261) | func TestShowCommandHelp_Customtemplate(t *testing.T) {
  function TestShowSubcommandHelp_CommandUsageText (line 303) | func TestShowSubcommandHelp_CommandUsageText(t *testing.T) {
  function TestShowSubcommandHelp_SubcommandUsageText (line 323) | func TestShowSubcommandHelp_SubcommandUsageText(t *testing.T) {
  function TestShowAppHelp_HiddenCommand (line 347) | func TestShowAppHelp_HiddenCommand(t *testing.T) {
  function TestShowAppHelp_CustomAppTemplate (line 379) | func TestShowAppHelp_CustomAppTemplate(t *testing.T) {

FILE: vendor/github.com/codegangsta/cli/helpers_test.go
  function expect (line 15) | func expect(t *testing.T, a interface{}, b interface{}) {
  function refute (line 24) | func refute(t *testing.T, a interface{}, b interface{}) {

FILE: vendor/github.com/codegangsta/cli/helpers_unix_test.go
  function clearenv (line 7) | func clearenv() {

FILE: vendor/github.com/codegangsta/cli/helpers_windows_test.go
  function clearenv (line 10) | func clearenv() {

FILE: vendor/github.com/mitchellh/go-homedir/homedir.go
  function Dir (line 26) | func Dir() (string, error) {
  function Expand (line 58) | func Expand(path string) (string, error) {
  function dirUnix (line 79) | func dirUnix() (string, error) {
  function dirWindows (line 120) | func dirWindows() (string, error) {

FILE: vendor/github.com/mitchellh/go-homedir/homedir_test.go
  function patchEnv (line 10) | func patchEnv(key, value string) func() {
  function BenchmarkDir (line 20) | func BenchmarkDir(b *testing.B) {
  function TestDir (line 32) | func TestDir(t *testing.T) {
  function TestExpand (line 48) | func TestExpand(t *testing.T) {

FILE: vendor/gopkg.in/yaml.v2/apic.go
  function yaml_insert_token (line 8) | func yaml_insert_token(parser *yaml_parser_t, pos int, token *yaml_token...
  function yaml_parser_initialize (line 28) | func yaml_parser_initialize(parser *yaml_parser_t) bool {
  function yaml_parser_delete (line 37) | func yaml_parser_delete(parser *yaml_parser_t) {
  function yaml_string_read_handler (line 42) | func yaml_string_read_handler(parser *yaml_parser_t, buffer []byte) (n i...
  function yaml_file_read_handler (line 52) | func yaml_file_read_handler(parser *yaml_parser_t, buffer []byte) (n int...
  function yaml_parser_set_input_string (line 57) | func yaml_parser_set_input_string(parser *yaml_parser_t, input []byte) {
  function yaml_parser_set_input_file (line 67) | func yaml_parser_set_input_file(parser *yaml_parser_t, file *os.File) {
  function yaml_parser_set_encoding (line 76) | func yaml_parser_set_encoding(parser *yaml_parser_t, encoding yaml_encod...
  function yaml_emitter_initialize (line 84) | func yaml_emitter_initialize(emitter *yaml_emitter_t) bool {
  function yaml_emitter_delete (line 95) | func yaml_emitter_delete(emitter *yaml_emitter_t) {
  function yaml_string_write_handler (line 100) | func yaml_string_write_handler(emitter *yaml_emitter_t, buffer []byte) e...
  function yaml_file_write_handler (line 106) | func yaml_file_write_handler(emitter *yaml_emitter_t, buffer []byte) err...
  function yaml_emitter_set_output_string (line 112) | func yaml_emitter_set_output_string(emitter *yaml_emitter_t, output_buff...
  function yaml_emitter_set_output_file (line 121) | func yaml_emitter_set_output_file(emitter *yaml_emitter_t, file io.Write...
  function yaml_emitter_set_encoding (line 130) | func yaml_emitter_set_encoding(emitter *yaml_emitter_t, encoding yaml_en...
  function yaml_emitter_set_canonical (line 138) | func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) {
  function yaml_emitter_set_indent (line 143) | func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) {
  function yaml_emitter_set_width (line 151) | func yaml_emitter_set_width(emitter *yaml_emitter_t, width int) {
  function yaml_emitter_set_unicode (line 159) | func yaml_emitter_set_unicode(emitter *yaml_emitter_t, unicode bool) {
  function yaml_emitter_set_break (line 164) | func yaml_emitter_set_break(emitter *yaml_emitter_t, line_break yaml_bre...
  function yaml_stream_start_event_initialize (line 255) | func yaml_stream_start_event_initialize(event *yaml_event_t, encoding ya...
  function yaml_stream_end_event_initialize (line 264) | func yaml_stream_end_event_initialize(event *yaml_event_t) bool {
  function yaml_document_start_event_initialize (line 272) | func yaml_document_start_event_initialize(event *yaml_event_t, version_d...
  function yaml_document_end_event_initialize (line 284) | func yaml_document_end_event_initialize(event *yaml_event_t, implicit bo...
  function yaml_scalar_event_initialize (line 317) | func yaml_scalar_event_initialize(event *yaml_event_t, anchor, tag, valu...
  function yaml_sequence_start_event_initialize (line 331) | func yaml_sequence_start_event_initialize(event *yaml_event_t, anchor, t...
  function yaml_sequence_end_event_initialize (line 343) | func yaml_sequence_end_event_initialize(event *yaml_event_t) bool {
  function yaml_mapping_start_event_initialize (line 351) | func yaml_mapping_start_event_initialize(event *yaml_event_t, anchor, ta...
  function yaml_mapping_end_event_initialize (line 363) | func yaml_mapping_end_event_initialize(event *yaml_event_t) bool {
  function yaml_event_delete (line 371) | func yaml_event_delete(event *yaml_event_t) {

FILE: vendor/gopkg.in/yaml.v2/decode.go
  constant documentNode (line 14) | documentNode = 1 << iota
  constant mappingNode (line 15) | mappingNode
  constant sequenceNode (line 16) | sequenceNode
  constant scalarNode (line 17) | scalarNode
  constant aliasNode (line 18) | aliasNode
  type node (line 21) | type node struct
  type parser (line 34) | type parser struct
    method destroy (line 60) | func (p *parser) destroy() {
    method skip (line 67) | func (p *parser) skip() {
    method fail (line 79) | func (p *parser) fail() {
    method anchor (line 99) | func (p *parser) anchor(n *node, anchor []byte) {
    method parse (line 105) | func (p *parser) parse() *node {
    method node (line 125) | func (p *parser) node(kind int) *node {
    method document (line 133) | func (p *parser) document() *node {
    method alias (line 146) | func (p *parser) alias() *node {
    method scalar (line 153) | func (p *parser) scalar() *node {
    method sequence (line 163) | func (p *parser) sequence() *node {
    method mapping (line 174) | func (p *parser) mapping() *node {
  function newParser (line 40) | func newParser(b []byte) *parser {
  type decoder (line 188) | type decoder struct
    method terror (line 209) | func (d *decoder) terror(n *node, tag string, out reflect.Value) {
    method callUnmarshaler (line 224) | func (d *decoder) callUnmarshaler(n *node, u Unmarshaler) (good bool) {
    method prepare (line 253) | func (d *decoder) prepare(n *node, out reflect.Value) (newout reflect....
    method unmarshal (line 277) | func (d *decoder) unmarshal(n *node, out reflect.Value) (good bool) {
    method document (line 301) | func (d *decoder) document(n *node, out reflect.Value) (good bool) {
    method alias (line 310) | func (d *decoder) alias(n *node, out reflect.Value) (good bool) {
    method scalar (line 332) | func (d *decoder) scalar(n *node, out reflect.Value) (good bool) {
    method sequence (line 478) | func (d *decoder) sequence(n *node, out reflect.Value) (good bool) {
    method mapping (line 510) | func (d *decoder) mapping(n *node, out reflect.Value) (good bool) {
    method mappingSlice (line 572) | func (d *decoder) mappingSlice(n *node, out reflect.Value) (good bool) {
    method mappingStruct (line 603) | func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) {
    method merge (line 654) | func (d *decoder) merge(n *node, out reflect.Value) {
  function newDecoder (line 203) | func newDecoder(strict bool) *decoder {
  function resetMap (line 326) | func resetMap(out reflect.Value) {
  function settableValueOf (line 471) | func settableValueOf(i interface{}) reflect.Value {
  function failWantMap (line 650) | func failWantMap() {
  function isMerge (line 683) | func isMerge(n *node) bool {

FILE: vendor/gopkg.in/yaml.v2/decode_test.go
  type M (line 601) | type M
  type inlineB (line 603) | type inlineB struct
  type inlineC (line 608) | type inlineC struct
  method TestUnmarshal (line 612) | func (s *S) TestUnmarshal(c *C) {
  method TestUnmarshalNaN (line 638) | func (s *S) TestUnmarshalNaN(c *C) {
  method TestUnmarshalErrors (line 659) | func (s *S) TestUnmarshalErrors(c *C) {
  type unmarshalerType (line 683) | type unmarshalerType struct
    method UnmarshalYAML (line 687) | func (o *unmarshalerType) UnmarshalYAML(unmarshal func(v interface{}) ...
  type unmarshalerPointer (line 699) | type unmarshalerPointer struct
  type unmarshalerValue (line 703) | type unmarshalerValue struct
  method TestUnmarshalerPointerField (line 707) | func (s *S) TestUnmarshalerPointerField(c *C) {
  method TestUnmarshalerValueField (line 721) | func (s *S) TestUnmarshalerValueField(c *C) {
  method TestUnmarshalerWholeDocument (line 731) | func (s *S) TestUnmarshalerWholeDocument(c *C) {
  method TestUnmarshalerTypeError (line 740) | func (s *S) TestUnmarshalerTypeError(c *C) {
  type proxyTypeError (line 771) | type proxyTypeError struct
    method UnmarshalYAML (line 773) | func (v *proxyTypeError) UnmarshalYAML(unmarshal func(interface{}) err...
  method TestUnmarshalerTypeErrorProxying (line 792) | func (s *S) TestUnmarshalerTypeErrorProxying(c *C) {
  type failingUnmarshaler (line 809) | type failingUnmarshaler struct
    method UnmarshalYAML (line 813) | func (ft *failingUnmarshaler) UnmarshalYAML(unmarshal func(interface{}...
  method TestUnmarshalerError (line 817) | func (s *S) TestUnmarshalerError(c *C) {
  type sliceUnmarshaler (line 822) | type sliceUnmarshaler
    method UnmarshalYAML (line 824) | func (su *sliceUnmarshaler) UnmarshalYAML(unmarshal func(interface{}) ...
  method TestUnmarshalerRetry (line 842) | func (s *S) TestUnmarshalerRetry(c *C) {
  method TestMerge (line 909) | func (s *S) TestMerge(c *C) {
  method TestMergeStruct (line 928) | func (s *S) TestMergeStruct(c *C) {
  method TestUnmarshalNull (line 956) | func (s *S) TestUnmarshalNull(c *C) {
  method TestUnmarshalSliceOnPreset (line 970) | func (s *S) TestUnmarshalSliceOnPreset(c *C) {
  method TestUnmarshalStrict (line 977) | func (s *S) TestUnmarshalStrict(c *C) {

FILE: vendor/gopkg.in/yaml.v2/emitterc.go
  function flush (line 8) | func flush(emitter *yaml_emitter_t) bool {
  function put (line 16) | func put(emitter *yaml_emitter_t, value byte) bool {
  function put_break (line 27) | func put_break(emitter *yaml_emitter_t) bool {
  function write (line 51) | func write(emitter *yaml_emitter_t, s []byte, i *int) bool {
  function write_all (line 79) | func write_all(emitter *yaml_emitter_t, s []byte) bool {
  function write_break (line 89) | func write_break(emitter *yaml_emitter_t, s []byte, i *int) bool {
  function yaml_emitter_set_emitter_error (line 106) | func yaml_emitter_set_emitter_error(emitter *yaml_emitter_t, problem str...
  function yaml_emitter_emit (line 113) | func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool {
  function yaml_emitter_need_more_events (line 136) | func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool {
  function yaml_emitter_append_tag_directive (line 173) | func yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *y...
  function yaml_emitter_increase_indent (line 196) | func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentl...
  function yaml_emitter_state_machine (line 211) | func yaml_emitter_state_machine(emitter *yaml_emitter_t, event *yaml_eve...
  function yaml_emitter_emit_stream_start (line 272) | func yaml_emitter_emit_stream_start(emitter *yaml_emitter_t, event *yaml...
  function yaml_emitter_emit_document_start (line 311) | func yaml_emitter_emit_document_start(emitter *yaml_emitter_t, event *ya...
  function yaml_emitter_emit_document_content (line 425) | func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *...
  function yaml_emitter_emit_document_end (line 431) | func yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml...
  function yaml_emitter_emit_flow_sequence_item (line 456) | func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event...
  function yaml_emitter_emit_flow_mapping_key (line 504) | func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *...
  function yaml_emitter_emit_flow_mapping_value (line 558) | func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event...
  function yaml_emitter_emit_block_sequence_item (line 578) | func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, even...
  function yaml_emitter_emit_block_mapping_key (line 602) | func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event ...
  function yaml_emitter_emit_block_mapping_value (line 630) | func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, even...
  function yaml_emitter_emit_node (line 648) | func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t,
  function yaml_emitter_emit_alias (line 672) | func yaml_emitter_emit_alias(emitter *yaml_emitter_t, event *yaml_event_...
  function yaml_emitter_emit_scalar (line 682) | func yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event...
  function yaml_emitter_emit_sequence_start (line 706) | func yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *ya...
  function yaml_emitter_emit_mapping_start (line 723) | func yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yam...
  function yaml_emitter_check_empty_document (line 740) | func yaml_emitter_check_empty_document(emitter *yaml_emitter_t) bool {
  function yaml_emitter_check_empty_sequence (line 745) | func yaml_emitter_check_empty_sequence(emitter *yaml_emitter_t) bool {
  function yaml_emitter_check_empty_mapping (line 754) | func yaml_emitter_check_empty_mapping(emitter *yaml_emitter_t) bool {
  function yaml_emitter_check_simple_key (line 763) | func yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool {
  function yaml_emitter_select_scalar_style (line 797) | func yaml_emitter_select_scalar_style(emitter *yaml_emitter_t, event *ya...
  function yaml_emitter_process_anchor (line 846) | func yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool {
  function yaml_emitter_process_tag (line 861) | func yaml_emitter_process_tag(emitter *yaml_emitter_t) bool {
  function yaml_emitter_process_scalar (line 890) | func yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool {
  function yaml_emitter_analyze_version_directive (line 911) | func yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, ver...
  function yaml_emitter_analyze_tag_directive (line 919) | func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_dir...
  function yaml_emitter_analyze_anchor (line 943) | func yaml_emitter_analyze_anchor(emitter *yaml_emitter_t, anchor []byte,...
  function yaml_emitter_analyze_tag (line 966) | func yaml_emitter_analyze_tag(emitter *yaml_emitter_t, tag []byte) bool {
  function yaml_emitter_analyze_scalar (line 983) | func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) ...
  function yaml_emitter_analyze_event (line 1132) | func yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_eve...
  function yaml_emitter_write_bom (line 1188) | func yaml_emitter_write_bom(emitter *yaml_emitter_t) bool {
  function yaml_emitter_write_indent (line 1200) | func yaml_emitter_write_indent(emitter *yaml_emitter_t) bool {
  function yaml_emitter_write_indicator (line 1220) | func yaml_emitter_write_indicator(emitter *yaml_emitter_t, indicator []b...
  function yaml_emitter_write_anchor (line 1235) | func yaml_emitter_write_anchor(emitter *yaml_emitter_t, value []byte) bo...
  function yaml_emitter_write_tag_handle (line 1244) | func yaml_emitter_write_tag_handle(emitter *yaml_emitter_t, value []byte...
  function yaml_emitter_write_tag_content (line 1258) | func yaml_emitter_write_tag_content(emitter *yaml_emitter_t, value []byt...
  function yaml_emitter_write_plain_scalar (line 1312) | func yaml_emitter_write_plain_scalar(emitter *yaml_emitter_t, value []by...
  function yaml_emitter_write_single_quoted_scalar (line 1369) | func yaml_emitter_write_single_quoted_scalar(emitter *yaml_emitter_t, va...
  function yaml_emitter_write_double_quoted_scalar (line 1428) | func yaml_emitter_write_double_quoted_scalar(emitter *yaml_emitter_t, va...
  function yaml_emitter_write_block_scalar_hints (line 1549) | func yaml_emitter_write_block_scalar_hints(emitter *yaml_emitter_t, valu...
  function yaml_emitter_write_literal_scalar (line 1591) | func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []...
  function yaml_emitter_write_folded_scalar (line 1628) | func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []b...

FILE: vendor/gopkg.in/yaml.v2/encode.go
  type encoder (line 14) | type encoder struct
    method finish (line 33) | func (e *encoder) finish() {
    method destroy (line 41) | func (e *encoder) destroy() {
    method emit (line 45) | func (e *encoder) emit() {
    method must (line 52) | func (e *encoder) must(ok bool) {
    method marshal (line 62) | func (e *encoder) marshal(tag string, in reflect.Value) {
    method mapv (line 127) | func (e *encoder) mapv(tag string, in reflect.Value) {
    method itemsv (line 138) | func (e *encoder) itemsv(tag string, in reflect.Value) {
    method structv (line 148) | func (e *encoder) structv(tag string, in reflect.Value) {
    method mappingv (line 187) | func (e *encoder) mappingv(tag string, f func()) {
    method slicev (line 201) | func (e *encoder) slicev(tag string, in reflect.Value) {
    method stringv (line 240) | func (e *encoder) stringv(tag string, in reflect.Value) {
    method boolv (line 264) | func (e *encoder) boolv(tag string, in reflect.Value) {
    method intv (line 274) | func (e *encoder) intv(tag string, in reflect.Value) {
    method uintv (line 279) | func (e *encoder) uintv(tag string, in reflect.Value) {
    method floatv (line 284) | func (e *encoder) floatv(tag string, in reflect.Value) {
    method nilv (line 298) | func (e *encoder) nilv() {
    method emitScalar (line 302) | func (e *encoder) emitScalar(value, anchor, tag string, style yaml_sca...
  function newEncoder (line 21) | func newEncoder() (e *encoder) {
  function isBase60Float (line 223) | func isBase60Float(s string) (result bool) {

FILE: vendor/gopkg.in/yaml.v2/encode_test.go
  method TestMarshal (line 327) | func (s *S) TestMarshal(c *C) {
  method TestMarshalErrors (line 355) | func (s *S) TestMarshalErrors(c *C) {
  method TestMarshalTypeCache (line 366) | func (s *S) TestMarshalTypeCache(c *C) {
  type marshalerType (line 393) | type marshalerType struct
    method MarshalText (line 397) | func (o marshalerType) MarshalText() ([]byte, error) {
    method MarshalYAML (line 401) | func (o marshalerType) MarshalYAML() (interface{}, error) {
  type marshalerValue (line 405) | type marshalerValue struct
  method TestMarshaler (line 409) | func (s *S) TestMarshaler(c *C) {
  method TestMarshalerWholeDocument (line 419) | func (s *S) TestMarshalerWholeDocument(c *C) {
  type failingMarshaler (line 427) | type failingMarshaler struct
    method MarshalYAML (line 429) | func (ft *failingMarshaler) MarshalYAML() (interface{}, error) {
  method TestMarshalerError (line 433) | func (s *S) TestMarshalerError(c *C) {
  method TestSortedOutput (line 438) | func (s *S) TestSortedOutput(c *C) {

FILE: vendor/gopkg.in/yaml.v2/example_embedded_test.go
  type StructA (line 13) | type StructA struct
  type StructB (line 17) | type StructB struct
  function ExampleUnmarshal_embedded (line 29) | func ExampleUnmarshal_embedded() {

FILE: vendor/gopkg.in/yaml.v2/parserc.go
  function peek_token (line 46) | func peek_token(parser *yaml_parser_t) *yaml_token_t {
  function skip_token (line 54) | func skip_token(parser *yaml_parser_t) {
  function yaml_parser_parse (line 62) | func yaml_parser_parse(parser *yaml_parser_t, event *yaml_event_t) bool {
  function yaml_parser_set_parser_error (line 76) | func yaml_parser_set_parser_error(parser *yaml_parser_t, problem string,...
  function yaml_parser_set_parser_error_context (line 83) | func yaml_parser_set_parser_error_context(parser *yaml_parser_t, context...
  function yaml_parser_state_machine (line 93) | func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_...
  function yaml_parser_parse_stream_start (line 174) | func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_e...
  function yaml_parser_parse_document_start (line 198) | func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml...
  function yaml_parser_parse_document_content (line 282) | func yaml_parser_parse_document_content(parser *yaml_parser_t, event *ya...
  function yaml_parser_parse_document_end (line 305) | func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_e...
  function yaml_parser_parse_node (line 359) | func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, ...
  function yaml_parser_parse_block_sequence_entry (line 579) | func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event...
  function yaml_parser_parse_indentless_sequence_entry (line 631) | func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, ...
  function yaml_parser_parse_block_mapping_key (line 675) | func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *y...
  function yaml_parser_parse_block_mapping_value (line 733) | func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event ...
  function yaml_parser_parse_flow_sequence_entry (line 770) | func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event ...
  function yaml_parser_parse_flow_sequence_entry_mapping_key (line 833) | func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_pars...
  function yaml_parser_parse_flow_sequence_entry_mapping_value (line 854) | func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_pa...
  function yaml_parser_parse_flow_sequence_entry_mapping_end (line 878) | func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_pars...
  function yaml_parser_parse_flow_mapping_key (line 904) | func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *ya...
  function yaml_parser_parse_flow_mapping_value (line 970) | func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *...
  function yaml_parser_process_empty_scalar (line 995) | func yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml...
  function yaml_parser_process_directives (line 1013) | func yaml_parser_process_directives(parser *yaml_parser_t,
  function yaml_parser_append_tag_directive (line 1075) | func yaml_parser_append_tag_directive(parser *yaml_parser_t, value yaml_...

FILE: vendor/gopkg.in/yaml.v2/readerc.go
  function yaml_parser_set_reader_error (line 8) | func yaml_parser_set_reader_error(parser *yaml_parser_t, problem string,...
  constant bom_UTF8 (line 18) | bom_UTF8    = "\xef\xbb\xbf"
  constant bom_UTF16LE (line 19) | bom_UTF16LE = "\xff\xfe"
  constant bom_UTF16BE (line 20) | bom_UTF16BE = "\xfe\xff"
  function yaml_parser_determine_encoding (line 25) | func yaml_parser_determine_encoding(parser *yaml_parser_t) bool {
  function yaml_parser_update_raw_buffer (line 56) | func yaml_parser_update_raw_buffer(parser *yaml_parser_t) bool {
  function yaml_parser_update_buffer (line 91) | func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool {

FILE: vendor/gopkg.in/yaml.v2/resolve.go
  type resolveMapItem (line 12) | type resolveMapItem struct
  function init (line 20) | func init() {
  constant longTagPrefix (line 59) | longTagPrefix = "tag:yaml.org,2002:"
  function shortTag (line 61) | func shortTag(tag string) string {
  function longTag (line 69) | func longTag(tag string) string {
  function resolvableTag (line 76) | func resolvableTag(tag string) bool {
  function resolve (line 86) | func resolve(tag string, in string) (rtag string, out interface{}) {
  function encodeBase64 (line 187) | func encodeBase64(s string) string {

FILE: vendor/gopkg.in/yaml.v2/scannerc.go
  function cache (line 485) | func cache(parser *yaml_parser_t, length int) bool {
  function skip (line 491) | func skip(parser *yaml_parser_t) {
  function skip_line (line 498) | func skip_line(parser *yaml_parser_t) {
  function read (line 515) | func read(parser *yaml_parser_t, s []byte) []byte {
  function read_line (line 538) | func read_line(parser *yaml_parser_t, s []byte) []byte {
  function yaml_parser_scan (line 571) | func yaml_parser_scan(parser *yaml_parser_t, token *yaml_token_t) bool {
  function yaml_parser_set_scanner_error (line 600) | func yaml_parser_set_scanner_error(parser *yaml_parser_t, context string...
  function yaml_parser_set_scanner_tag_error (line 609) | func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive ...
  function trace (line 617) | func trace(args ...interface{}) func() {
  function yaml_parser_fetch_more_tokens (line 626) | func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool {
  function yaml_parser_fetch_next_token (line 665) | func yaml_parser_fetch_next_token(parser *yaml_parser_t) bool {
  function yaml_parser_stale_simple_keys (line 842) | func yaml_parser_stale_simple_keys(parser *yaml_parser_t) bool {
  function yaml_parser_save_simple_key (line 867) | func yaml_parser_save_simple_key(parser *yaml_parser_t) bool {
  function yaml_parser_remove_simple_key (line 900) | func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool {
  function yaml_parser_increase_flow_level (line 916) | func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool {
  function yaml_parser_decrease_flow_level (line 926) | func yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool {
  function yaml_parser_roll_indent (line 937) | func yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, ...
  function yaml_parser_unroll_indent (line 966) | func yaml_parser_unroll_indent(parser *yaml_parser_t, column int) bool {
  function yaml_parser_fetch_stream_start (line 990) | func yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool {
  function yaml_parser_fetch_stream_end (line 1016) | func yaml_parser_fetch_stream_end(parser *yaml_parser_t) bool {
  function yaml_parser_fetch_directive (line 1047) | func yaml_parser_fetch_directive(parser *yaml_parser_t) bool {
  function yaml_parser_fetch_document_indicator (line 1071) | func yaml_parser_fetch_document_indicator(parser *yaml_parser_t, typ yam...
  function yaml_parser_fetch_flow_collection_start (line 1105) | func yaml_parser_fetch_flow_collection_start(parser *yaml_parser_t, typ ...
  function yaml_parser_fetch_flow_collection_end (line 1136) | func yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ ya...
  function yaml_parser_fetch_flow_entry (line 1168) | func yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool {
  function yaml_parser_fetch_block_entry (line 1193) | func yaml_parser_fetch_block_entry(parser *yaml_parser_t) bool {
  function yaml_parser_fetch_key (line 1235) | func yaml_parser_fetch_key(parser *yaml_parser_t) bool {
  function yaml_parser_fetch_value (line 1274) | func yaml_parser_fetch_value(parser *yaml_parser_t) bool {
  function yaml_parser_fetch_anchor (line 1339) | func yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type...
  function yaml_parser_fetch_tag (line 1358) | func yaml_parser_fetch_tag(parser *yaml_parser_t) bool {
  function yaml_parser_fetch_block_scalar (line 1377) | func yaml_parser_fetch_block_scalar(parser *yaml_parser_t, literal bool)...
  function yaml_parser_fetch_flow_scalar (line 1396) | func yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) b...
  function yaml_parser_fetch_plain_scalar (line 1415) | func yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool {
  function yaml_parser_scan_to_next_token (line 1434) | func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool {
  function yaml_parser_scan_directive (line 1499) | func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token...
  function yaml_parser_scan_directive_name (line 1600) | func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark y...
  function yaml_parser_scan_version_directive_value (line 1636) | func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, sta...
  constant max_number_length (line 1668) | max_number_length = 2
  function yaml_parser_scan_version_directive_number (line 1677) | func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, st...
  function yaml_parser_scan_tag_directive_value (line 1713) | func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_m...
  function yaml_parser_scan_anchor (line 1771) | func yaml_parser_scan_anchor(parser *yaml_parser_t, token *yaml_token_t,...
  function yaml_parser_scan_tag (line 1829) | func yaml_parser_scan_tag(parser *yaml_parser_t, token *yaml_token_t) bo...
  function yaml_parser_scan_tag_handle (line 1914) | func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, ...
  function yaml_parser_scan_tag_uri (line 1959) | func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, hea...
  function yaml_parser_scan_uri_escapes (line 2018) | func yaml_parser_scan_uri_escapes(parser *yaml_parser_t, directive bool,...
  function yaml_parser_scan_block_scalar (line 2064) | func yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_to...
  function yaml_parser_scan_block_scalar_breaks (line 2252) | func yaml_parser_scan_block_scalar_breaks(parser *yaml_parser_t, indent ...
  function yaml_parser_scan_flow_scalar (line 2306) | func yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_tok...
  function yaml_parser_scan_plain_scalar (line 2562) | func yaml_parser_scan_plain_scalar(parser *yaml_parser_t, token *yaml_to...

FILE: vendor/gopkg.in/yaml.v2/sorter.go
  type keyList (line 8) | type keyList
    method Len (line 10) | func (l keyList) Len() int      { return len(l) }
    method Swap (line 11) | func (l keyList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
    method Less (line 12) | func (l keyList) Less(i, j int) bool {
  function keyFloat (line 73) | func keyFloat(v reflect.Value) (f float64, ok bool) {
  function numLess (line 92) | func numLess(a, b reflect.Value) bool {

FILE: vendor/gopkg.in/yaml.v2/suite_test.go
  function Test (line 8) | func Test(t *testing.T) { TestingT(t) }
  type S (line 10) | type S struct

FILE: vendor/gopkg.in/yaml.v2/writerc.go
  function yaml_emitter_set_writer_error (line 4) | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem stri...
  function yaml_emitter_flush (line 11) | func yaml_emitter_flush(emitter *yaml_emitter_t) bool {

FILE: vendor/gopkg.in/yaml.v2/yaml.go
  type MapSlice (line 19) | type MapSlice
  type MapItem (line 22) | type MapItem struct
  type Unmarshaler (line 31) | type Unmarshaler interface
  type Marshaler (line 41) | type Marshaler interface
  function Unmarshal (line 79) | func Unmarshal(in []byte, out interface{}) (err error) {
  function UnmarshalStrict (line 86) | func UnmarshalStrict(in []byte, out interface{}) (err error) {
  function unmarshal (line 90) | func unmarshal(in []byte, out interface{}, strict bool) (err error) {
  function Marshal (line 149) | func Marshal(in interface{}) (out []byte, err error) {
  function handleErr (line 159) | func handleErr(err *error) {
  type yamlError (line 169) | type yamlError struct
  function fail (line 173) | func fail(err error) {
  function failf (line 177) | func failf(format string, args ...interface{}) {
  type TypeError (line 185) | type TypeError struct
    method Error (line 189) | func (e *TypeError) Error() string {
  type structInfo (line 200) | type structInfo struct
  type fieldInfo (line 209) | type fieldInfo struct
  function getStructInfo (line 222) | func getStructInfo(st reflect.Type) (*structInfo, error) {
  function isZero (line 326) | func isZero(v reflect.Value) bool {

FILE: vendor/gopkg.in/yaml.v2/yamlh.go
  type yaml_version_directive_t (line 8) | type yaml_version_directive_t struct
  type yaml_tag_directive_t (line 14) | type yaml_tag_directive_t struct
  type yaml_encoding_t (line 19) | type yaml_encoding_t
  constant yaml_ANY_ENCODING (line 24) | yaml_ANY_ENCODING yaml_encoding_t = iota
  constant yaml_UTF8_ENCODING (line 26) | yaml_UTF8_ENCODING
  constant yaml_UTF16LE_ENCODING (line 27) | yaml_UTF16LE_ENCODING
  constant yaml_UTF16BE_ENCODING (line 28) | yaml_UTF16BE_ENCODING
  type yaml_break_t (line 31) | type yaml_break_t
  constant yaml_ANY_BREAK (line 36) | yaml_ANY_BREAK yaml_break_t = iota
  constant yaml_CR_BREAK (line 38) | yaml_CR_BREAK
  constant yaml_LN_BREAK (line 39) | yaml_LN_BREAK
  constant yaml_CRLN_BREAK (line 40) | yaml_CRLN_BREAK
  type yaml_error_type_t (line 43) | type yaml_error_type_t
  constant yaml_NO_ERROR (line 48) | yaml_NO_ERROR yaml_error_type_t = iota
  constant yaml_MEMORY_ERROR (line 50) | yaml_MEMORY_ERROR
  constant yaml_READER_ERROR (line 51) | yaml_READER_ERROR
  constant yaml_SCANNER_ERROR (line 52) | yaml_SCANNER_ERROR
  constant yaml_PARSER_ERROR (line 53) | yaml_PARSER_ERROR
  constant yaml_COMPOSER_ERROR (line 54) | yaml_COMPOSER_ERROR
  constant yaml_WRITER_ERROR (line 55) | yaml_WRITER_ERROR
  constant yaml_EMITTER_ERROR (line 56) | yaml_EMITTER_ERROR
  type yaml_mark_t (line 60) | type yaml_mark_t struct
  type yaml_style_t (line 68) | type yaml_style_t
  type yaml_scalar_style_t (line 70) | type yaml_scalar_style_t
  constant yaml_ANY_SCALAR_STYLE (line 75) | yaml_ANY_SCALAR_STYLE yaml_scalar_style_t = iota
  constant yaml_PLAIN_SCALAR_STYLE (line 77) | yaml_PLAIN_SCALAR_STYLE
  constant yaml_SINGLE_QUOTED_SCALAR_STYLE (line 78) | yaml_SINGLE_QUOTED_SCALAR_STYLE
  constant yaml_DOUBLE_QUOTED_SCALAR_STYLE (line 79) | yaml_DOUBLE_QUOTED_SCALAR_STYLE
  constant yaml_LITERAL_SCALAR_STYLE (line 80) | yaml_LITERAL_SCALAR_STYLE
  constant yaml_FOLDED_SCALAR_STYLE (line 81) | yaml_FOLDED_SCALAR_STYLE
  type yaml_sequence_style_t (line 84) | type yaml_sequence_style_t
  constant yaml_ANY_SEQUENCE_STYLE (line 89) | yaml_ANY_SEQUENCE_STYLE yaml_sequence_style_t = iota
  constant yaml_BLOCK_SEQUENCE_STYLE (line 91) | yaml_BLOCK_SEQUENCE_STYLE
  constant yaml_FLOW_SEQUENCE_STYLE (line 92) | yaml_FLOW_SEQUENCE_STYLE
  type yaml_mapping_style_t (line 95) | type yaml_mapping_style_t
  constant yaml_ANY_MAPPING_STYLE (line 100) | yaml_ANY_MAPPING_STYLE yaml_mapping_style_t = iota
  constant yaml_BLOCK_MAPPING_STYLE (line 102) | yaml_BLOCK_MAPPING_STYLE
  constant yaml_FLOW_MAPPING_STYLE (line 103) | yaml_FLOW_MAPPING_STYLE
  type yaml_token_type_t (line 108) | type yaml_token_type_t
    method String (line 143) | func (tt yaml_token_type_t) String() string {
  constant yaml_NO_TOKEN (line 113) | yaml_NO_TOKEN yaml_token_type_t = iota
  constant yaml_STREAM_START_TOKEN (line 115) | yaml_STREAM_START_TOKEN
  constant yaml_STREAM_END_TOKEN (line 116) | yaml_STREAM_END_TOKEN
  constant yaml_VERSION_DIRECTIVE_TOKEN (line 118) | yaml_VERSION_DIRECTIVE_TOKEN
  constant yaml_TAG_DIRECTIVE_TOKEN (line 119) | yaml_TAG_DIRECTIVE_TOKEN
  constant yaml_DOCUMENT_START_TOKEN (line 120) | yaml_DOCUMENT_START_TOKEN
  constant yaml_DOCUMENT_END_TOKEN (line 121) | yaml_DOCUMENT_END_TOKEN
  constant yaml_BLOCK_SEQUENCE_START_TOKEN (line 123) | yaml_BLOCK_SEQUENCE_START_TOKEN
  constant yaml_BLOCK_MAPPING_START_TOKEN (line 124) | yaml_BLOCK_MAPPING_START_TOKEN
  constant yaml_BLOCK_END_TOKEN (line 125) | yaml_BLOCK_END_TOKEN
  constant yaml_FLOW_SEQUENCE_START_TOKEN (line 127) | yaml_FLOW_SEQUENCE_START_TOKEN
  constant yaml_FLOW_SEQUENCE_END_TOKEN (line 128) | yaml_FLOW_SEQUENCE_END_TOKEN
  constant yaml_FLOW_MAPPING_START_TOKEN (line 129) | yaml_FLOW_MAPPING_START_TOKEN
  constant yaml_FLOW_MAPPING_END_TOKEN (line 130) | yaml_FLOW_MAPPING_END_TOKEN
  constant yaml_BLOCK_ENTRY_TOKEN (line 132) | yaml_BLOCK_ENTRY_TOKEN
  constant yaml_FLOW_ENTRY_TOKEN (line 133) | yaml_FLOW_ENTRY_TOKEN
  constant yaml_KEY_TOKEN (line 134) | yaml_KEY_TOKEN
  constant yaml_VALUE_TOKEN (line 135) | yaml_VALUE_TOKEN
  constant yaml_ALIAS_TOKEN (line 137) | yaml_ALIAS_TOKEN
  constant yaml_ANCHOR_TOKEN (line 138) | yaml_ANCHOR_TOKEN
  constant yaml_TAG_TOKEN (line 139) | yaml_TAG_TOKEN
  constant yaml_SCALAR_TOKEN (line 140) | yaml_SCALAR_TOKEN
  type yaml_token_t (line 194) | type yaml_token_t struct
  type yaml_event_type_t (line 223) | type yaml_event_type_t
  constant yaml_NO_EVENT (line 228) | yaml_NO_EVENT yaml_event_type_t = iota
  constant yaml_STREAM_START_EVENT (line 230) | yaml_STREAM_START_EVENT
  constant yaml_STREAM_END_EVENT (line 231) | yaml_STREAM_END_EVENT
  constant yaml_DOCUMENT_START_EVENT (line 232) | yaml_DOCUMENT_START_EVENT
  constant yaml_DOCUMENT_END_EVENT (line 233) | yaml_DOCUMENT_END_EVENT
  constant yaml_ALIAS_EVENT (line 234) | yaml_ALIAS_EVENT
  constant yaml_SCALAR_EVENT (line 235) | yaml_SCALAR_EVENT
  constant yaml_SEQUENCE_START_EVENT (line 236) | yaml_SEQUENCE_START_EVENT
  constant yaml_SEQUENCE_END_EVENT (line 237) | yaml_SEQUENCE_END_EVENT
  constant yaml_MAPPING_START_EVENT (line 238) | yaml_MAPPING_START_EVENT
  constant yaml_MAPPING_END_EVENT (line 239) | yaml_MAPPING_END_EVENT
  type yaml_event_t (line 243) | type yaml_event_t struct
    method scalar_style (line 280) | func (e *yaml_event_t) scalar_style() yaml_scalar_style_t     { return...
    method sequence_style (line 281) | func (e *yaml_event_t) sequence_style() yaml_sequence_style_t { return...
    method mapping_style (line 282) | func (e *yaml_event_t) mapping_style() yaml_mapping_style_t   { return...
  constant yaml_NULL_TAG (line 287) | yaml_NULL_TAG      = "tag:yaml.org,2002:null"
  constant yaml_BOOL_TAG (line 288) | yaml_BOOL_TAG      = "tag:yaml.org,2002:bool"
  constant yaml_STR_TAG (line 289) | yaml_STR_TAG       = "tag:yaml.org,2002:str"
  constant yaml_INT_TAG (line 290) | yaml_INT_TAG       = "tag:yaml.org,2002:int"
  constant yaml_FLOAT_TAG (line 291) | yaml_FLOAT_TAG     = "tag:yaml.org,2002:float"
  constant yaml_TIMESTAMP_TAG (line 292) | yaml_TIMESTAMP_TAG = "tag:yaml.org,2002:timestamp"
  constant yaml_SEQ_TAG (line 294) | yaml_SEQ_TAG = "tag:yaml.org,2002:seq"
  constant yaml_MAP_TAG (line 295) | yaml_MAP_TAG = "tag:yaml.org,2002:map"
  constant yaml_BINARY_TAG (line 298) | yaml_BINARY_TAG = "tag:yaml.org,2002:binary"
  constant yaml_MERGE_TAG (line 299) | yaml_MERGE_TAG  = "tag:yaml.org,2002:merge"
  constant yaml_DEFAULT_SCALAR_TAG (line 301) | yaml_DEFAULT_SCALAR_TAG   = yaml_STR_TAG
  constant yaml_DEFAULT_SEQUENCE_TAG (line 302) | yaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG
  constant yaml_DEFAULT_MAPPING_TAG (line 303) | yaml_DEFAULT_MAPPING_TAG  = yaml_MAP_TAG
  type yaml_node_type_t (line 306) | type yaml_node_type_t
  constant yaml_NO_NODE (line 311) | yaml_NO_NODE yaml_node_type_t = iota
  constant yaml_SCALAR_NODE (line 313) | yaml_SCALAR_NODE
  constant yaml_SEQUENCE_NODE (line 314) | yaml_SEQUENCE_NODE
  constant yaml_MAPPING_NODE (line 315) | yaml_MAPPING_NODE
  type yaml_node_item_t (line 319) | type yaml_node_item_t
  type yaml_node_pair_t (line 322) | type yaml_node_pair_t struct
  type yaml_node_t (line 328) | type yaml_node_t struct
  type yaml_document_t (line 362) | type yaml_document_t struct
  type yaml_read_handler_t (line 397) | type yaml_read_handler_t
  type yaml_simple_key_t (line 400) | type yaml_simple_key_t struct
  type yaml_parser_state_t (line 408) | type yaml_parser_state_t
    method String (line 438) | func (ps yaml_parser_state_t) String() string {
  constant yaml_PARSE_STREAM_START_STATE (line 411) | yaml_PARSE_STREAM_START_STATE yaml_parser_state_t = iota
  constant yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE (line 413) | yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE
  constant yaml_PARSE_DOCUMENT_START_STATE (line 414) | yaml_PARSE_DOCUMENT_START_STATE
  constant yaml_PARSE_DOCUMENT_CONTENT_STATE (line 415) | yaml_PARSE_DOCUMENT_CONTENT_STATE
  constant yaml_PARSE_DOCUMENT_END_STATE (line 416) | yaml_PARSE_DOCUMENT_END_STATE
  constant yaml_PARSE_BLOCK_NODE_STATE (line 417) | yaml_PARSE_BLOCK_NODE_STATE
  constant yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE (line 418) | yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE
  constant yaml_PARSE_FLOW_NODE_STATE (line 419) | yaml_PARSE_FLOW_NODE_STATE
  constant yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE (line 420) | yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE
  constant yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE (line 421) | yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE
  constant yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE (line 422) | yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE
  constant yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE (line 423) | yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE
  constant yaml_PARSE_BLOCK_MAPPING_KEY_STATE (line 424) | yaml_PARSE_BLOCK_MAPPING_KEY_STATE
  constant yaml_PARSE_BLOCK_MAPPING_VALUE_STATE (line 425) | yaml_PARSE_BLOCK_MAPPING_VALUE_STATE
  constant yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE (line 426) | yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE
  constant yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE (line 427) | yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE
  constant yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE (line 428) | yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE
  constant yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE (line 429) | yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE
  constant yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE (line 430) | yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE
  constant yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE (line 431) | yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE
  constant yaml_PARSE_FLOW_MAPPING_KEY_STATE (line 432) | yaml_PARSE_FLOW_MAPPING_KEY_STATE
  constant yaml_PARSE_FLOW_MAPPING_VALUE_STATE (line 433) | yaml_PARSE_FLOW_MAPPING_VALUE_STATE
  constant yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE (line 434) | yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE
  constant yaml_PARSE_END_STATE (line 435) | yaml_PARSE_END_STATE
  type yaml_alias_data_t (line 493) | type yaml_alias_data_t struct
  type yaml_parser_t (line 503) | type yaml_parser_t struct
  type yaml_write_handler_t (line 591) | type yaml_write_handler_t
  type yaml_emitter_state_t (line 593) | type yaml_emitter_state_t
  constant yaml_EMIT_STREAM_START_STATE (line 598) | yaml_EMIT_STREAM_START_STATE yaml_emitter_state_t = iota
  constant yaml_EMIT_FIRST_DOCUMENT_START_STATE (line 600) | yaml_EMIT_FIRST_DOCUMENT_START_STATE
  constant yaml_EMIT_DOCUMENT_START_STATE (line 601) | yaml_EMIT_DOCUMENT_START_STATE
  constant yaml_EMIT_DOCUMENT_CONTENT_STATE (line 602) | yaml_EMIT_DOCUMENT_CONTENT_STATE
  constant yaml_EMIT_DOCUMENT_END_STATE (line 603) | yaml_EMIT_DOCUMENT_END_STATE
  constant yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE (line 604) | yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE
  constant yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE (line 605) | yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE
  constant yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE (line 606) | yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE
  constant yaml_EMIT_FLOW_MAPPING_KEY_STATE (line 607) | yaml_EMIT_FLOW_MAPPING_KEY_STATE
  constant yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE (line 608) | yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE
  constant yaml_EMIT_FLOW_MAPPING_VALUE_STATE (line 609) | yaml_EMIT_FLOW_MAPPING_VALUE_STATE
  constant yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE (line 610) | yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE
  constant yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE (line 611) | yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE
  constant yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE (line 612) | yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE
  constant yaml_EMIT_BLOCK_MAPPING_KEY_STATE (line 613) | yaml_EMIT_BLOCK_MAPPING_KEY_STATE
  constant yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE (line 614) | yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE
  constant yaml_EMIT_BLOCK_MAPPING_VALUE_STATE (line 615) | yaml_EMIT_BLOCK_MAPPING_VALUE_STATE
  constant yaml_EMIT_END_STATE (line 616) | yaml_EMIT_END_STATE
  type yaml_emitter_t (line 623) | type yaml_emitter_t struct

FILE: vendor/gopkg.in/yaml.v2/yamlprivateh.go
  constant input_raw_buffer_size (line 5) | input_raw_buffer_size = 512
  constant input_buffer_size (line 9) | input_buffer_size = input_raw_buffer_size * 3
  constant output_buffer_size (line 12) | output_buffer_size = 128
  constant output_raw_buffer_size (line 16) | output_raw_buffer_size = (output_buffer_size*2 + 2)
  constant initial_stack_size (line 19) | initial_stack_size  = 16
  constant initial_queue_size (line 20) | initial_queue_size  = 16
  constant initial_string_size (line 21) | initial_string_size = 16
  function is_alpha (line 26) | func is_alpha(b []byte, i int) bool {
  function is_digit (line 31) | func is_digit(b []byte, i int) bool {
  function as_digit (line 36) | func as_digit(b []byte, i int) int {
  function is_hex (line 41) | func is_hex(b []byte, i int) bool {
  function as_hex (line 46) | func as_hex(b []byte, i int) int {
  function is_ascii (line 58) | func is_ascii(b []byte, i int) bool {
  function is_printable (line 63) | func is_printable(b []byte, i int) bool {
  function is_z (line 76) | func is_z(b []byte, i int) bool {
  function is_bom (line 81) | func is_bom(b []byte, i int) bool {
  function is_space (line 86) | func is_space(b []byte, i int) bool {
  function is_tab (line 91) | func is_tab(b []byte, i int) bool {
  function is_blank (line 96) | func is_blank(b []byte, i int) bool {
  function is_break (line 102) | func is_break(b []byte, i int) bool {
  function is_crlf (line 110) | func is_crlf(b []byte, i int) bool {
  function is_breakz (line 115) | func is_breakz(b []byte, i int) bool {
  function is_spacez (line 128) | func is_spacez(b []byte, i int) bool {
  function is_blankz (line 142) | func is_blankz(b []byte, i int) bool {
  function width (line 156) | func width(b byte) int {
Condensed preview — 217 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,285K chars).
[
  {
    "path": ".gitignore",
    "chars": 80,
    "preview": "glide\nglide.exe\n*.a\n*.sublime-project\n*.sublime-workspace\ndist/\n.DS_Store\n.idea\n"
  },
  {
    "path": ".travis.yml",
    "chars": 755,
    "preview": "language: go\n\ngo:\n  - 1.7.x\n  - 1.8.x\n  - 1.9.x\n  - 1.10.x\n  - 1.11.x\n  - 1.12.x\n  - tip\n\n# Setting sudo access to false"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 19831,
    "preview": "# Release 0.13.4 (unreleased)\n\n# Release 0.13.3 (2019-07-12)\n\n## Fixed\n\n- #1056: Fixed issue where Glide is not detectin"
  },
  {
    "path": "LICENSE",
    "chars": 1189,
    "preview": "Glide\nThe Masterminds\nCopyright (C) 2014-2016, Matt Butcher and Matt Farina\nCopyright (C) 2016, Hewlett Packard Enterpri"
  },
  {
    "path": "Makefile",
    "chars": 1878,
    "preview": "GLIDE_GO_EXECUTABLE ?= go\nDIST_DIRS := find * -type d -exec\nVERSION ?= $(shell git describe --tags)\nVERSION_INCODE = $(s"
  },
  {
    "path": "README.md",
    "chars": 19815,
    "preview": "# Glide: Vendor Package Management for Golang\n\n![glide logo](https://glide.sh/assets/logo-small.png)\n\nAre you used to to"
  },
  {
    "path": "action/about.go",
    "chars": 1753,
    "preview": "package action\n\nimport \"github.com/Masterminds/glide/msg\"\n\nconst aboutMessage = `\nGlide: Vendor Package Management for G"
  },
  {
    "path": "action/about_test.go",
    "chars": 338,
    "preview": "package action\n\nimport (\n\t\"bytes\"\n\t\"testing\"\n\n\t\"github.com/Masterminds/glide/msg\"\n)\n\nfunc TestAbout(t *testing.T) {\n\tvar"
  },
  {
    "path": "action/cache.go",
    "chars": 364,
    "preview": "package action\n\nimport (\n\t\"os\"\n\n\t\"github.com/Masterminds/glide/cache\"\n\t\"github.com/Masterminds/glide/msg\"\n)\n\n// CacheCle"
  },
  {
    "path": "action/config_wizard.go",
    "chars": 10149,
    "preview": "package action\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/Masterminds/glide/cache\"\n\t"
  },
  {
    "path": "action/create.go",
    "chars": 7022,
    "preview": "package action\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"github.com/Masterminds/glide/cfg\"\n\t\"github.com/Mas"
  },
  {
    "path": "action/debug.go",
    "chars": 355,
    "preview": "package action\n\nimport (\n\t\"github.com/Masterminds/glide/msg\"\n)\n\n// Debug sets the debugging flags across components.\nfun"
  },
  {
    "path": "action/doc.go",
    "chars": 653,
    "preview": "// Package action provides implementations for every Glide command.\n//\n// This is not a general-purpose library. It is t"
  },
  {
    "path": "action/ensure.go",
    "chars": 4859,
    "preview": "package action\n\nimport (\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/Masterminds/gli"
  },
  {
    "path": "action/get.go",
    "chars": 7092,
    "preview": "package action\n\nimport (\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/Masterminds/glide/cache\"\n\t\"github.com/Mastermi"
  },
  {
    "path": "action/get_test.go",
    "chars": 1087,
    "preview": "package action\n\nimport (\n\t\"io/ioutil\"\n\t\"testing\"\n\n\t\"github.com/Masterminds/glide/cfg\"\n\t\"github.com/Masterminds/glide/msg"
  },
  {
    "path": "action/import_gb.go",
    "chars": 1245,
    "preview": "package action\n\nimport (\n\t\"github.com/Masterminds/glide/cfg\"\n\t\"github.com/Masterminds/glide/gb\"\n\t\"github.com/Masterminds"
  },
  {
    "path": "action/import_godep.go",
    "chars": 446,
    "preview": "package action\n\nimport (\n\t\"github.com/Masterminds/glide/godep\"\n\t\"github.com/Masterminds/glide/msg\"\n)\n\n// ImportGodep imp"
  },
  {
    "path": "action/import_gom.go",
    "chars": 427,
    "preview": "package action\n\nimport (\n\t\"github.com/Masterminds/glide/gom\"\n\t\"github.com/Masterminds/glide/msg\"\n)\n\n// ImportGom imports"
  },
  {
    "path": "action/import_gpm.go",
    "chars": 443,
    "preview": "package action\n\nimport (\n\t\"github.com/Masterminds/glide/gpm\"\n\t\"github.com/Masterminds/glide/msg\"\n)\n\n// ImportGPM imports"
  },
  {
    "path": "action/init.go",
    "chars": 236,
    "preview": "package action\n\nimport (\n\tgpath \"github.com/Masterminds/glide/path\"\n)\n\n// Init initializes the action subsystem for hand"
  },
  {
    "path": "action/install.go",
    "chars": 1703,
    "preview": "package action\n\nimport (\n\t\"path/filepath\"\n\n\t\"github.com/Masterminds/glide/cache\"\n\t\"github.com/Masterminds/glide/cfg\"\n\t\"g"
  },
  {
    "path": "action/list.go",
    "chars": 2344,
    "preview": "package action\n\nimport (\n\t\"encoding/json\"\n\t\"path/filepath\"\n\t\"sort\"\n\n\t\"github.com/Masterminds/glide/dependency\"\n\t\"github."
  },
  {
    "path": "action/list_test.go",
    "chars": 998,
    "preview": "package action\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"testing\"\n\n\t\"github.com/Masterminds/glide/msg\"\n)\n\nfunc TestList(t *t"
  },
  {
    "path": "action/mirrors.go",
    "chars": 2932,
    "preview": "package action\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/Masterminds/glide/mirrors\"\n\t\"github.com/Masterminds/glide/"
  },
  {
    "path": "action/name.go",
    "chars": 199,
    "preview": "package action\n\nimport (\n\t\"github.com/Masterminds/glide/msg\"\n)\n\n// Name prints the name of the package, according to the"
  },
  {
    "path": "action/name_test.go",
    "chars": 519,
    "preview": "package action\n\nimport (\n\t\"bytes\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/Masterminds/glide/msg\"\n)\n\nfunc TestName(t *testing.T) {"
  },
  {
    "path": "action/no_vendor.go",
    "chars": 3002,
    "preview": "package action\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/Masterminds/glide/msg\"\n)\n\n// NoVendor generates"
  },
  {
    "path": "action/no_vendor_test.go",
    "chars": 185,
    "preview": "package action\n\nimport (\n\t\"testing\"\n\n\t\"github.com/Masterminds/glide/msg\"\n)\n\nfunc TestNoVendor(t *testing.T) {\n\tmsg.Defau"
  },
  {
    "path": "action/plugin.go",
    "chars": 1300,
    "preview": "package action\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\n\t\"github.com/Masterminds/glide/msg\"\n)\n\n// Plugin attempts to find and execute"
  },
  {
    "path": "action/plugin_test.go",
    "chars": 548,
    "preview": "package action\n\nimport (\n\t\"os\"\n\t\"runtime\"\n\t\"testing\"\n\n\t\"github.com/Masterminds/glide/msg\"\n)\n\nfunc TestPlugin(t *testing."
  },
  {
    "path": "action/project_info.go",
    "chars": 756,
    "preview": "package action\n\nimport (\n\t\"bytes\"\n\n\t\"github.com/Masterminds/glide/msg\"\n)\n\n// Info prints information about a project bas"
  },
  {
    "path": "action/rebuild.go",
    "chars": 2447,
    "preview": "package action\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/Masterminds/glide/cfg\"\n\t\"git"
  },
  {
    "path": "action/rebuild_test.go",
    "chars": 307,
    "preview": "package action\n\nimport (\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/Masterminds/glide/msg\"\n)\n\nfunc TestRebuild(t *testing.T) {\n\tmsg."
  },
  {
    "path": "action/remove.go",
    "chars": 1679,
    "preview": "package action\n\nimport (\n\t\"github.com/Masterminds/glide/cache\"\n\t\"github.com/Masterminds/glide/cfg\"\n\t\"github.com/Mastermi"
  },
  {
    "path": "action/tree.go",
    "chars": 757,
    "preview": "package action\n\nimport (\n\t\"container/list\"\n\t\"os\"\n\n\t\"github.com/Masterminds/glide/msg\"\n\t\"github.com/Masterminds/glide/tre"
  },
  {
    "path": "action/update.go",
    "chars": 3585,
    "preview": "package action\n\nimport (\n\t\"io/ioutil\"\n\t\"path/filepath\"\n\n\t\"github.com/Masterminds/glide/cache\"\n\t\"github.com/Masterminds/g"
  },
  {
    "path": "appveyor.yml",
    "chars": 372,
    "preview": "\nversion: build-{build}.{branch}\n\nclone_folder: C:\\gopath\\src\\github.com\\Masterminds\\glide\nshallow_clone: true\n\nenvironm"
  },
  {
    "path": "cache/cache.go",
    "chars": 5321,
    "preview": "// Package cache provides an interface for interfacing with the Glide local cache\n//\n// Glide has a local cache of metad"
  },
  {
    "path": "cache/cache_test.go",
    "chars": 511,
    "preview": "package cache\n\nimport \"testing\"\n\nfunc TestKey(t *testing.T) {\n\ttests := map[string]string{\n\t\t\"https://github.com/foo/bar"
  },
  {
    "path": "cache/global_lock.go",
    "chars": 2589,
    "preview": "package cache\n\nimport (\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/signal\"\n\t\"path/filepath\"\n\t\"time\"\n\n\t\"github.com/Mastermi"
  },
  {
    "path": "cache/memory.go",
    "chars": 2922,
    "preview": "package cache\n\nimport (\n\t\"sync\"\n\n\t\"github.com/Masterminds/glide/msg\"\n\t\"github.com/Masterminds/semver\"\n)\n\n// Provide an i"
  },
  {
    "path": "cfg/cfg.go",
    "chars": 3144,
    "preview": "// Package cfg handles working with the Glide configuration files.\n//\n// The cfg package contains the ability to parse ("
  },
  {
    "path": "cfg/config.go",
    "chars": 15630,
    "preview": "package cfg\n\nimport (\n\t\"crypto/sha256\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"reflect\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"github.com/Masterminds/glide"
  },
  {
    "path": "cfg/config_test.go",
    "chars": 3958,
    "preview": "package cfg\n\nimport (\n\t\"testing\"\n\n\t\"gopkg.in/yaml.v2\"\n)\n\nvar yml = `\npackage: fake/testing\ndescription: foo bar baz\nhome"
  },
  {
    "path": "cfg/lock.go",
    "chars": 6078,
    "preview": "package cfg\n\nimport (\n\t\"crypto/sha256\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n\n\t\"gopkg.in/yaml.v2\"\n)\n\n// Lockfil"
  },
  {
    "path": "cfg/lock_test.go",
    "chars": 2341,
    "preview": "package cfg\n\nimport (\n\t\"sort\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestSortLocks(t *testing.T) {\n\tc, err := ConfigFromYaml([]by"
  },
  {
    "path": "dependency/resolver.go",
    "chars": 36903,
    "preview": "package dependency\n\nimport (\n\t\"container/list\"\n\t\"errors\"\n\t\"runtime\"\n\t\"sort\"\n\n\t//\"go/build\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"stri"
  },
  {
    "path": "dependency/resolver_test.go",
    "chars": 2480,
    "preview": "package dependency\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/Masterminds/glide/cfg\"\n)\n\nfunc T"
  },
  {
    "path": "dependency/scan.go",
    "chars": 6836,
    "preview": "package dependency\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"text/scanner\"\n\n\t\"github.com/Masterminds/"
  },
  {
    "path": "docs/commands.md",
    "chars": 6562,
    "preview": "# Commands\n\nThe following are the Glide commands, most of which are to help you manage your workspace.\n\n## glide create "
  },
  {
    "path": "docs/example-glide.yaml",
    "chars": 2446,
    "preview": "# The name of this package.\npackage: github.com/Masterminds/glide\n\n# External dependencies.\nimport:\n  # Minimal definiti"
  },
  {
    "path": "docs/faq.md",
    "chars": 2840,
    "preview": "# Frequently Asked Questions (F.A.Q.)\n\n## Q: Why does Glide have the concept of sub-packages when Go doesn't?\n\nIn Go eve"
  },
  {
    "path": "docs/getting-started.md",
    "chars": 4511,
    "preview": "# Getting Started With Glide\n\nThis is a quick start guide to using Glide once you have it installed.\n\n## Initially Detec"
  },
  {
    "path": "docs/glide-plugin-example",
    "chars": 678,
    "preview": "#!/bin/bash\n\n# You can execute me through Glide by doing the following:\n# - Copy me to a directory on $PATH. _vendor/bin"
  },
  {
    "path": "docs/glide.lock.md",
    "chars": 1006,
    "preview": "# The glide.lock File\n\nWhere a [`glide.yaml`](glide.yaml.md) file contains the dependencies, versions (including ranges)"
  },
  {
    "path": "docs/glide.yaml.md",
    "chars": 3928,
    "preview": "# The glide.yaml File\n\nThe `glide.yaml` file contains information about the project and the dependent packages. Here the"
  },
  {
    "path": "docs/importing.md",
    "chars": 659,
    "preview": "# Importing\n\nGlide has limited support for importing from other formats.\n\n**Note:** If you'd like to help build importer"
  },
  {
    "path": "docs/index.md",
    "chars": 1675,
    "preview": "# Glide: Vendor Package Management for Go\n\n[Glide](https://glide.sh) is a package manager for [Go](https://golang.org) t"
  },
  {
    "path": "docs/plugins.md",
    "chars": 2928,
    "preview": "# Glide Plugins\n\nGlide supports a simple plugin system similar to Git.\n\n## Existing Plugins\n\nSome plugins exist today fo"
  },
  {
    "path": "docs/resolving-imports.md",
    "chars": 3063,
    "preview": "# Resolving Imports\n\nGlide scans an applications codebase to discover the projects to manage in the `vendor/` directory."
  },
  {
    "path": "docs/vendor.md",
    "chars": 2836,
    "preview": "# Vendor Directories\n\nWith the release of Go 1.5 the `vendor/` directory was added to the resolution locations for a dep"
  },
  {
    "path": "docs/versions.md",
    "chars": 2081,
    "preview": "# Versions and Ranges\n\nGlide supports [Semantic Versions](http://semver.org), SemVer ranges, branches, tags, and commit "
  },
  {
    "path": "gb/gb.go",
    "chars": 1536,
    "preview": "package gb\n\nimport (\n\t\"encoding/json\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/Masterminds/glide/cfg\"\n\t\"github.com/Mastermin"
  },
  {
    "path": "gb/manifest.go",
    "chars": 624,
    "preview": "// Package gb provides compatibility with GB manifests.\npackage gb\n\n// This is lifted wholesale from GB's `vendor/manife"
  },
  {
    "path": "glide.go",
    "chars": 26569,
    "preview": "// Glide is a command line utility that manages Go project dependencies.\n//\n// Configuration of where to start is manage"
  },
  {
    "path": "glide.yaml",
    "chars": 517,
    "preview": "package: github.com/Masterminds/glide\nhomepage: https://glide.sh\nlicense: MIT\nowners:\n- name: Matt Butcher\n  email: tech"
  },
  {
    "path": "glide_test.go",
    "chars": 144,
    "preview": "package main\n\nimport (\n\t\"testing\"\n)\n\nfunc TestCommandsNonEmpty(t *testing.T) {\n\tcommands := commands()\n\tif len(commands)"
  },
  {
    "path": "godep/godep.go",
    "chars": 3022,
    "preview": "// Package godep provides basic importing of Godep dependencies.\n//\n// This is not a complete implementation of Godep.\np"
  },
  {
    "path": "godep/strip/strip.go",
    "chars": 3481,
    "preview": "// Package strip removes Godeps/_workspace and undoes the Godep rewrites. This\n// essentially removes the old style (pre"
  },
  {
    "path": "godep/strip/strip_test.go",
    "chars": 448,
    "preview": "package strip\n\nimport \"testing\"\n\nfunc TestRewriteGodepImport(t *testing.T) {\n\ttests := map[string]string{\n\t\t\"github.com/"
  },
  {
    "path": "gom/gom.go",
    "chars": 2499,
    "preview": "package gom\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/Masterminds/glide/cfg\"\n\t\"github.com/Masterminds/gli"
  },
  {
    "path": "gom/parser.go",
    "chars": 3107,
    "preview": "package gom\n\n// This is copied + slightly adapted from gom's `gomfile.go` file.\n//\n// gom's license is MIT-style.\n\nimpor"
  },
  {
    "path": "gpm/gpm.go",
    "chars": 1548,
    "preview": "// Package gpm reads GPM's Godeps files.\n//\n// It is not a complete implementaton of GPM.\npackage gpm\n\nimport (\n\t\"bufio\""
  },
  {
    "path": "importer/importer.go",
    "chars": 2277,
    "preview": "// Package importer imports dependency configuration from Glide, Godep, GPM, GB and gom\npackage importer\n\nimport (\n\t\"io/"
  },
  {
    "path": "mirrors/cfg.go",
    "chars": 2424,
    "preview": "package mirrors\n\nimport (\n\t\"io/ioutil\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"gopkg.in/yaml.v2\"\n)\n\n// Mirrors contains global mirrors to "
  },
  {
    "path": "mirrors/mirrors.go",
    "chars": 1366,
    "preview": "// Package mirrors handles managing mirrors in the running application\npackage mirrors\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/fil"
  },
  {
    "path": "mirrors/mirrors_test.go",
    "chars": 709,
    "preview": "package mirrors\n\nimport \"testing\"\n\nvar oyml = `\nrepos:\n- original: github.com/Masterminds/semver\n  repo: file:///path/to"
  },
  {
    "path": "mkdocs.yml",
    "chars": 348,
    "preview": "site_name: Glide Documentation\npages:\n- Home: index.md\n- Getting Started: getting-started.md\n- The glide.yaml File: glid"
  },
  {
    "path": "msg/msg.go",
    "chars": 8293,
    "preview": "package msg\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/Masterminds/vcs\"\n)\n\n// Messenger prov"
  },
  {
    "path": "msg/out.go",
    "chars": 645,
    "preview": "// +build !windows\n\npackage msg\n\nimport \"fmt\"\n\n// These contanstants map to color codes for shell scripts making them\n//"
  },
  {
    "path": "msg/out_windows.go",
    "chars": 495,
    "preview": "// +build windows\n\npackage msg\n\n// The color codes here are for compatibility with how Colors are used. Windows\n// color"
  },
  {
    "path": "path/path.go",
    "chars": 7290,
    "preview": "// Package path contains path and environment utilities for Glide.\n//\n// This includes tools to find and manipulate Go p"
  },
  {
    "path": "path/path_test.go",
    "chars": 3019,
    "preview": "package path\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"testing\"\n)\n\nconst testdata = \"../testdata/path\"\n\nfunc TestGli"
  },
  {
    "path": "path/strip.go",
    "chars": 1064,
    "preview": "package path\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/Masterminds/glide/godep/strip\"\n\t\"github.com/Masterminds/glid"
  },
  {
    "path": "path/strip_int_test.go",
    "chars": 1749,
    "preview": "package path\n\nimport (\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path\"\n\t\"testing\"\n)\n\nfunc generateTestDirectory(t *testing.T) string {\n\tbaseD"
  },
  {
    "path": "path/strip_test.go",
    "chars": 3225,
    "preview": "package path\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"testing\"\n\t\"time\"\n)\n\ntype mockFileInfo struct {\n\tnam"
  },
  {
    "path": "path/winbug.go",
    "chars": 3282,
    "preview": "package path\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"runtime\"\n\t\"syscall\"\n\n\t\"bytes\"\n\t\"io/ioutil\"\n\n\t\"github.com/Masterminds/gl"
  },
  {
    "path": "repo/installer.go",
    "chars": 27165,
    "preview": "package repo\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"gi"
  },
  {
    "path": "repo/repo.go",
    "chars": 664,
    "preview": "// Package repo provides tools for working with VCS repositories.\n//\n// Glide manages repositories in the vendor directo"
  },
  {
    "path": "repo/semver.go",
    "chars": 753,
    "preview": "package repo\n\nimport (\n\t\"github.com/Masterminds/semver\"\n\t\"github.com/Masterminds/vcs\"\n)\n\n// Filter a list of versions to"
  },
  {
    "path": "repo/set_reference.go",
    "chars": 1882,
    "preview": "package repo\n\nimport (\n\t\"sync\"\n\n\t\"github.com/Masterminds/glide/cache\"\n\t\"github.com/Masterminds/glide/cfg\"\n\t\"github.com/M"
  },
  {
    "path": "repo/tracker.go",
    "chars": 876,
    "preview": "package repo\n\nimport (\n\t\"sync\"\n)\n\n// UpdateTracker holds a list of all the packages that have been updated from\n// an ex"
  },
  {
    "path": "repo/tracker_test.go",
    "chars": 506,
    "preview": "package repo\n\nimport \"testing\"\n\nfunc TestUpdateTracker(t *testing.T) {\n\ttr := NewUpdateTracker()\n\n\tif f := tr.Check(\"git"
  },
  {
    "path": "repo/vcs.go",
    "chars": 12614,
    "preview": "package repo\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"s"
  },
  {
    "path": "testdata/name/glide.yaml",
    "chars": 43,
    "preview": "package: technosophos.com/x/foo\nimport: []\n"
  },
  {
    "path": "testdata/name/glide2.yaml",
    "chars": 33,
    "preview": "package: another/name\nimport: []\n"
  },
  {
    "path": "testdata/nv/a/foo.empty",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "testdata/nv/b/foo.empty",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "testdata/nv/c/foo.empty",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "testdata/path/a/b/c/placeholder.empty",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "testdata/path/a/glide.yaml",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "testdata/path/x/glide.yaml",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "testdata/path/x/symlinked_vendor/placeholder.empty",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "testdata/path/x/y/z/placeholder.empty",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "testdata/plugin/glide-hello",
    "chars": 46,
    "preview": "#!/bin/bash\necho \"Hello from the other glide\"\n"
  },
  {
    "path": "testdata/plugin/glide-hello-win.bat",
    "chars": 44,
    "preview": "@echo off\necho \"Hello from the other glide\"\n"
  },
  {
    "path": "testdata/rebuild/glide.yaml",
    "chars": 93,
    "preview": "package: github.com/Masterminds/glide/testdata/plugin\nimport:\n  - package: example.com/x/foo\n"
  },
  {
    "path": "tree/tree.go",
    "chars": 5815,
    "preview": "package tree\n\nimport (\n\t\"container/list\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/Masterminds/glide/dependency\"\n\t"
  },
  {
    "path": "tree/tree_test.go",
    "chars": 995,
    "preview": "/* Package tree contains functions for printing a dependency tree.\n\nThe future of the tree functionality is uncertain, a"
  },
  {
    "path": "util/normalizename_test.go",
    "chars": 1122,
    "preview": "package util\n\nimport (\n\t\"testing\"\n)\n\nfunc TestNormalizeName(t *testing.T) {\n\tpackages := []struct {\n\t\tinput string\n\t\troo"
  },
  {
    "path": "util/util.go",
    "chars": 9412,
    "preview": "package util\n\nimport (\n\t\"encoding/xml\"\n\t\"fmt\"\n\t\"go/build\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\""
  },
  {
    "path": "util/util_test.go",
    "chars": 2462,
    "preview": "package util\n\nimport \"testing\"\n\nfunc TestGetRootFromPackage(t *testing.T) {\n\turlList := map[string]string{\n\t\t\"github.com"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/.travis.yml",
    "chars": 709,
    "preview": "language: go\n\ngo:\n  - 1.6.x\n  - 1.7.x\n  - 1.8.x\n  - 1.9.x\n  - 1.10.x\n  - tip\n\n# Setting sudo access to false will let Tr"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/CHANGELOG.md",
    "chars": 2301,
    "preview": "# 1.4.2 (2018-04-10)\n\n## Changed\n- #72: Updated the docs to point to vert for a console appliaction\n- #71: Update the do"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/LICENSE.txt",
    "chars": 1094,
    "preview": "The Masterminds\nCopyright (C) 2014-2015, Matt Butcher and Matt Farina\n\nPermission is hereby granted, free of charge, to "
  },
  {
    "path": "vendor/github.com/Masterminds/semver/Makefile",
    "chars": 667,
    "preview": ".PHONY: setup\nsetup:\n\tgo get -u gopkg.in/alecthomas/gometalinter.v1\n\tgometalinter.v1 --install\n\n.PHONY: test\ntest: valid"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/README.md",
    "chars": 5933,
    "preview": "# SemVer\n\nThe `semver` package provides the ability to work with [Semantic Versions](http://semver.org) in Go. Specifica"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/appveyor.yml",
    "chars": 805,
    "preview": "version: build-{build}.{branch}\n\nclone_folder: C:\\gopath\\src\\github.com\\Masterminds\\semver\nshallow_clone: true\n\nenvironm"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/benchmark_test.go",
    "chars": 3496,
    "preview": "package semver_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/Masterminds/semver\"\n)\n\n/* Constraint creation benchmarks */\n\nfunc"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/collection.go",
    "chars": 729,
    "preview": "package semver\n\n// Collection is a collection of Version instances and implements the sort\n// interface. See the sort pa"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/collection_test.go",
    "chars": 589,
    "preview": "package semver\n\nimport (\n\t\"reflect\"\n\t\"sort\"\n\t\"testing\"\n)\n\nfunc TestCollection(t *testing.T) {\n\traw := []string{\n\t\t\"1.2.3"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/constraints.go",
    "chars": 10179,
    "preview": "package semver\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n)\n\n// Constraints is one or more constraint that a semant"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/constraints_test.go",
    "chars": 12329,
    "preview": "package semver\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestParseConstraint(t *testing.T) {\n\ttests := []struct {\n\t\tin  st"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/doc.go",
    "chars": 3720,
    "preview": "/*\nPackage semver provides the ability to work with Semantic Versions (http://semver.org) in Go.\n\nSpecifically it provid"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/version.go",
    "chars": 10281,
    "preview": "package semver\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// The compiled v"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/version_test.go",
    "chars": 10871,
    "preview": "package semver\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"testing\"\n)\n\nfunc TestNewVersion(t *testing.T) {\n\ttests := []struct {\n"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/.gitignore",
    "chars": 266,
    "preview": "# Compiled Object files, Static and Dynamic libs (Shared Objects)\n*.o\n*.a\n*.so\n\n# Folders\n_obj\n_test\n\n# Architecture spe"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/.travis.yml",
    "chars": 1263,
    "preview": "language: go\ndist: xenial\n\ngo:\n  - 1.6.x\n  - 1.7.x\n  - 1.8.x\n  - 1.9.x\n  - 1.10.x\n  - 1.11.x\n  - 1.12.x\n  - master\n\nbefo"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/CHANGELOG.md",
    "chars": 4809,
    "preview": "# Changelog\n\n## 1.13.1 (2019-07-09)\n\n### Fixed\n\n- #101: Updated bitbucket API call as previous API was removed\n- #97: Fi"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/LICENSE.txt",
    "chars": 1094,
    "preview": "The Masterminds\nCopyright (C) 2014-2015, Matt Butcher and Matt Farina\n\nPermission is hereby granted, free of charge, to "
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/Makefile",
    "chars": 973,
    "preview": ".PHONY: setup\nsetup:\n\tgo get -u gopkg.in/alecthomas/gometalinter.v1\n\tgometalinter.v1 --install\n\n.PHONY: test\ntest: valid"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/README.md",
    "chars": 2225,
    "preview": "# VCS Repository Management for Go\n\nManage repos in varying version control systems with ease through a common\ninterface"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/appveyor.yml",
    "chars": 372,
    "preview": "\nversion: build-{build}.{branch}\n\nclone_folder: C:\\gopath\\src\\github.com\\Masterminds\\vcs\nshallow_clone: true\n\nenvironmen"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/bzr.go",
    "chars": 10032,
    "preview": "package vcs\n\nimport (\n\t\"fmt\"\n\t\"net/url\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings\"\n\t\"time\"\n)\n\nvar bzrDetectU"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/bzr_test.go",
    "chars": 7409,
    "preview": "package vcs\n\nimport (\n\t\"io/ioutil\"\n\t\"path/filepath\"\n\t\"time\"\n\t//\"log\"\n\t\"os\"\n\t\"testing\"\n)\n\n// Canary test to ensure BzrRep"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/errors.go",
    "chars": 3125,
    "preview": "package vcs\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// The vcs package provides ways to work with errors that hide the underlying\n"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/errors_test.go",
    "chars": 664,
    "preview": "package vcs\n\nimport (\n\t\"errors\"\n\t\"testing\"\n)\n\nfunc TestNewRemoteError(t *testing.T) {\n\tbase := errors.New(\"Foo error\")\n\t"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/git.go",
    "chars": 14137,
    "preview": "package vcs\n\nimport (\n\t\"bytes\"\n\t\"encoding/xml\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\t\"ti"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/git_test.go",
    "chars": 15590,
    "preview": "package vcs\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"path/filepath\"\n\t\"time\"\n\t//\"log\"\n\t\"os\"\n\t\"testing\"\n)\n\n// Canary test to ensure"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/glide.yaml",
    "chars": 202,
    "preview": "package: github.com/Masterminds/vcs\nhomepage: https://github.com/Masterminds/vcs\nlicense: MIT\nowners:\n- name: Matt Farin"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/hg.go",
    "chars": 8663,
    "preview": "package vcs\n\nimport (\n\t\"bytes\"\n\t\"encoding/xml\"\n\t\"errors\"\n\t\"os\"\n\t\"os/exec\"\n\t\"regexp\"\n\t\"strings\"\n\t\"time\"\n)\n\nvar hgDetectUR"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/hg_test.go",
    "chars": 7626,
    "preview": "package vcs\n\nimport (\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n)\n\n// Canary test to ensure HgRe"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/repo.go",
    "chars": 7624,
    "preview": "// Package vcs provides the ability to work with varying version control systems\n// (VCS),  also known as source control"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/repo_test.go",
    "chars": 1693,
    "preview": "package vcs\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"testing\"\n)\n\nfunc ExampleNewRepo() {\n\tremote := \"https://github.com/Mas"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/svn.go",
    "chars": 11241,
    "preview": "package vcs\n\nimport (\n\t\"encoding/xml\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\t\"time\"\n)\n\n// NewSv"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/svn_test.go",
    "chars": 8011,
    "preview": "package vcs\n\nimport (\n\t\"io/ioutil\"\n\t\"path/filepath\"\n\t\"time\"\n\t//\"log\"\n\t\"os\"\n\t\"testing\"\n)\n\n// To verify svn is working we "
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/vcs_local_lookup.go",
    "chars": 1291,
    "preview": "package vcs\n\nimport (\n\t\"os\"\n\t\"runtime\"\n\t\"strings\"\n)\n\n// DetectVcsFromFS detects the type from the local path.\n// Is ther"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/vcs_remote_lookup.go",
    "chars": 8979,
    "preview": "package vcs\n\nimport (\n\t\"encoding/json\"\n\t\"encoding/xml\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"regexp\"\n\t\"stri"
  },
  {
    "path": "vendor/github.com/Masterminds/vcs/vcs_remote_lookup_test.go",
    "chars": 4442,
    "preview": "package vcs\n\nimport (\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/exec\"\n\t\"runtime\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestVCSLookup(t *testing.T)"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/.flake8",
    "chars": 31,
    "preview": "[flake8]\nmax-line-length = 120\n"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/.gitignore",
    "chars": 29,
    "preview": "*.coverprofile\nnode_modules/\n"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/.travis.yml",
    "chars": 417,
    "preview": "language: go\nsudo: false\ndist: trusty\nosx_image: xcode8.3\ngo: 1.8.x\n\nos:\n- linux\n- osx\n\ncache:\n  directories:\n  - node_m"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/CHANGELOG.md",
    "chars": 16210,
    "preview": "# Change Log\n\n**ATTN**: This project uses [semantic versioning](http://semver.org/).\n\n## [Unreleased]\n\n## 1.20.0 - 2017-"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/LICENSE",
    "chars": 1084,
    "preview": "MIT License\n\nCopyright (c) 2016 Jeremy Saenz & Contributors\n\nPermission is hereby granted, free of charge, to any person"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/README.md",
    "chars": 32018,
    "preview": "cli\n===\n\n[![Build Status](https://travis-ci.org/urfave/cli.svg?branch=master)](https://travis-ci.org/urfave/cli)\n[![Wind"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/altsrc/altsrc.go",
    "chars": 110,
    "preview": "package altsrc\n\n//go:generate python ../generate-flag-types altsrc -i ../flag-types.json -o flag_generated.go\n"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/altsrc/flag.go",
    "chars": 7486,
    "preview": "package altsrc\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"syscall\"\n\n\t\"gopkg.in/urfave/cli.v1\"\n)\n\n// FlagInputSourceExtensi"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/altsrc/flag_generated.go",
    "chars": 9574,
    "preview": "package altsrc\n\nimport (\n\t\"flag\"\n\n\t\"gopkg.in/urfave/cli.v1\"\n)\n\n// WARNING: This file is generated!\n\n// BoolFlag is the f"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/altsrc/flag_test.go",
    "chars": 9658,
    "preview": "package altsrc\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"gopkg.in/urfave/cli.v1\"\n)\n\ntype testApply"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/altsrc/helpers_test.go",
    "chars": 427,
    "preview": "package altsrc\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc expect(t *testing.T, a interface{}, b interface{}) {\n\tif !reflect"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/altsrc/input_source_context.go",
    "chars": 550,
    "preview": "package altsrc\n\nimport (\n\t\"time\"\n\n\t\"gopkg.in/urfave/cli.v1\"\n)\n\n// InputSourceContext is an interface used to allow\n// ot"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/altsrc/map_input_source.go",
    "chars": 7335,
    "preview": "package altsrc\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n\t\"time\"\n\n\t\"gopkg.in/urfave/cli.v1\"\n)\n\n// MapInputSource implements"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/altsrc/toml_command_test.go",
    "chars": 8137,
    "preview": "// Disabling building of toml support in cases where golang is 1.0 or 1.1\n// as the encoding library is not implemented "
  },
  {
    "path": "vendor/github.com/codegangsta/cli/altsrc/toml_file_loader.go",
    "chars": 2866,
    "preview": "// Disabling building of toml support in cases where golang is 1.0 or 1.1\n// as the encoding library is not implemented "
  },
  {
    "path": "vendor/github.com/codegangsta/cli/altsrc/yaml_command_test.go",
    "chars": 8128,
    "preview": "// Disabling building of yaml support in cases where golang is 1.0 or 1.1\n// as the encoding library is not implemented "
  },
  {
    "path": "vendor/github.com/codegangsta/cli/altsrc/yaml_file_loader.go",
    "chars": 2610,
    "preview": "// Disabling building of yaml support in cases where golang is 1.0 or 1.1\n// as the encoding library is not implemented "
  },
  {
    "path": "vendor/github.com/codegangsta/cli/app.go",
    "chars": 12419,
    "preview": "package cli\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sort\"\n\t\"time\"\n)\n\nvar (\n\tchangeLogURL           "
  },
  {
    "path": "vendor/github.com/codegangsta/cli/app_test.go",
    "chars": 38350,
    "preview": "package cli\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"flag\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"reflect\"\n\t\"strings\"\n\t\"testing\"\n)\n\nvar"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/appveyor.yml",
    "chars": 460,
    "preview": "version: \"{build}\"\n\nos: Windows Server 2016\n\nimage: Visual Studio 2017\n\nclone_folder: c:\\gopath\\src\\github.com\\urfave\\cl"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/autocomplete/bash_autocomplete",
    "chars": 350,
    "preview": "#! /bin/bash\n\n: ${PROG:=$(basename ${BASH_SOURCE})}\n\n_cli_bash_autocomplete() {\n    local cur opts base\n    COMPREPLY=()"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/autocomplete/zsh_autocomplete",
    "chars": 139,
    "preview": "autoload -U compinit && compinit\nautoload -U bashcompinit && bashcompinit\n\nscript_dir=$(dirname $0)\nsource ${script_dir}"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/category.go",
    "chars": 1089,
    "preview": "package cli\n\n// CommandCategories is a slice of *CommandCategory.\ntype CommandCategories []*CommandCategory\n\n// CommandC"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/cli.go",
    "chars": 721,
    "preview": "// Package cli provides a minimal framework for creating and organizing command line\n// Go applications. cli is designed"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/command.go",
    "chars": 7564,
    "preview": "package cli\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"sort\"\n\t\"strings\"\n)\n\n// Command is a subcommand for a cli.App.\ntype Command s"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/command_test.go",
    "chars": 5966,
    "preview": "package cli\n\nimport (\n\t\"errors\"\n\t\"flag\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestCommandFlagParsing(t *test"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/context.go",
    "chars": 6481,
    "preview": "package cli\n\nimport (\n\t\"errors\"\n\t\"flag\"\n\t\"reflect\"\n\t\"strings\"\n\t\"syscall\"\n)\n\n// Context is a type that is passed through "
  },
  {
    "path": "vendor/github.com/codegangsta/cli/context_test.go",
    "chars": 11481,
    "preview": "package cli\n\nimport (\n\t\"flag\"\n\t\"os\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestNewContext(t *testing.T) {\n\tset := flag.NewFlagSet(\"t"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/errors.go",
    "chars": 2713,
    "preview": "package cli\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n)\n\n// OsExiter is the function used when the app exits. If not set d"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/errors_test.go",
    "chars": 2347,
    "preview": "package cli\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"testing\"\n)\n\nfunc TestHandleExitCoder_nil(t *testing.T) {\n\texitCode := "
  },
  {
    "path": "vendor/github.com/codegangsta/cli/flag-types.json",
    "chars": 2188,
    "preview": "[\n  {\n    \"name\": \"Bool\",\n    \"type\": \"bool\",\n    \"value\": false,\n    \"context_default\": \"false\",\n    \"parser\": \"strconv"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/flag.go",
    "chars": 19998,
    "preview": "package cli\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"syscall\"\n\t\"time\"\n)\n\nconst defaultPlac"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/flag_generated.go",
    "chars": 13862,
    "preview": "package cli\n\nimport (\n\t\"flag\"\n\t\"strconv\"\n\t\"time\"\n)\n\n// WARNING: This file is generated!\n\n// BoolFlag is a flag with type"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/flag_test.go",
    "chars": 31283,
    "preview": "package cli\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"reflect\"\n\t\"regexp\"\n\t\"runtime\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n)\n\nvar boolFlagTests = "
  },
  {
    "path": "vendor/github.com/codegangsta/cli/funcs.go",
    "chars": 1264,
    "preview": "package cli\n\n// BashCompleteFunc is an action to execute when the bash-completion flag is set\ntype BashCompleteFunc func"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/generate-flag-types",
    "chars": 8183,
    "preview": "#!/usr/bin/env python\n\"\"\"\nThe flag types that ship with the cli library have many things in common, and\nso we can take a"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/help.go",
    "chars": 8872,
    "preview": "package cli\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\t\"text/tabwriter\"\n\t\"text/template\"\n)\n\n// AppHelpTemplate is the text"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/help_test.go",
    "chars": 10392,
    "preview": "package cli\n\nimport (\n\t\"bytes\"\n\t\"flag\"\n\t\"fmt\"\n\t\"runtime\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc Test_ShowAppHelp_NoAuthor(t *test"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/helpers_test.go",
    "chars": 594,
    "preview": "package cli\n\nimport (\n\t\"os\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strings\"\n\t\"testing\"\n)\n\nvar (\n\twd, _ = os.Getwd()\n)\n\nfunc expect(t *t"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/helpers_unix_test.go",
    "chars": 126,
    "preview": "// +build darwin dragonfly freebsd linux netbsd openbsd solaris\n\npackage cli\n\nimport \"os\"\n\nfunc clearenv() {\n\tos.Clearen"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/helpers_windows_test.go",
    "chars": 377,
    "preview": "package cli\n\nimport (\n\t\"os\"\n\t\"syscall\"\n)\n\n// os.Clearenv() doesn't actually unset variables on Windows\n// See: https://g"
  },
  {
    "path": "vendor/github.com/codegangsta/cli/runtests",
    "chars": 2929,
    "preview": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport argparse\nimport os\nimport sys\nimport tempfile\n\nfrom "
  },
  {
    "path": "vendor/github.com/mitchellh/go-homedir/LICENSE",
    "chars": 1085,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2013 Mitchell Hashimoto\n\nPermission is hereby granted, free of charge, to any perso"
  },
  {
    "path": "vendor/github.com/mitchellh/go-homedir/README.md",
    "chars": 681,
    "preview": "# go-homedir\n\nThis is a Go library for detecting the user's home directory without\nthe use of cgo, so the library can be"
  },
  {
    "path": "vendor/github.com/mitchellh/go-homedir/homedir.go",
    "chars": 2931,
    "preview": "package homedir\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n"
  },
  {
    "path": "vendor/github.com/mitchellh/go-homedir/homedir_test.go",
    "chars": 1649,
    "preview": "package homedir\n\nimport (\n\t\"os\"\n\t\"os/user\"\n\t\"path/filepath\"\n\t\"testing\"\n)\n\nfunc patchEnv(key, value string) func() {\n\tbck"
  },
  {
    "path": "vendor/gopkg.in/yaml.v2/.travis.yml",
    "chars": 92,
    "preview": "language: go\n\ngo:\n    - 1.4\n    - 1.5\n    - 1.6\n    - tip\n\ngo_import_path: gopkg.in/yaml.v2\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v2/LICENSE",
    "chars": 560,
    "preview": "Copyright 2011-2016 Canonical Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this"
  },
  {
    "path": "vendor/gopkg.in/yaml.v2/LICENSE.libyaml",
    "chars": 1313,
    "preview": "The following files were ported to Go from C files of libyaml, and thus\nare still covered by their original copyright an"
  },
  {
    "path": "vendor/gopkg.in/yaml.v2/README.md",
    "chars": 2658,
    "preview": "# YAML support for the Go language\n\nIntroduction\n------------\n\nThe yaml package enables Go programs to comfortably encod"
  }
]

// ... and 17 more files (download for full content)

About this extraction

This page contains the full source code of the Masterminds/glide GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 217 files (1.1 MB), approximately 333.3k tokens, and a symbol index with 1739 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!