Showing preview only (7,264K chars total). Download the full file or copy to clipboard to get everything.
Repository: golang/dep
Branch: master
Commit: f13583b555de
Files: 1088
Total size: 6.7 MB
Directory structure:
gitextract_vozcu06k/
├── .codeclimate.yml
├── .gitattributes
├── .github/
│ ├── CODEOWNERS
│ ├── ISSUE_TEMPLATE.md
│ └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .travis.yml
├── AUTHORS
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTORS
├── Gopkg.toml
├── LICENSE
├── MAINTAINERS.md
├── Makefile
├── PATENTS
├── README.md
├── analyzer.go
├── analyzer_notwindows_test.go
├── analyzer_test.go
├── analyzer_windows_test.go
├── appveyor.yml
├── cmd/
│ └── dep/
│ ├── check.go
│ ├── dep_test.go
│ ├── doc.go
│ ├── ensure.go
│ ├── ensure_test.go
│ ├── failures.go
│ ├── feature_flags.go
│ ├── gopath_scanner.go
│ ├── gopath_scanner_test.go
│ ├── graphviz.go
│ ├── graphviz_test.go
│ ├── init.go
│ ├── integration_test.go
│ ├── main.go
│ ├── mkdoc.sh
│ ├── prune.go
│ ├── root_analyzer.go
│ ├── status.go
│ ├── status_test.go
│ ├── testdata/
│ │ ├── cachedir/
│ │ │ ├── Gopkg.toml
│ │ │ └── main.go
│ │ ├── graphviz/
│ │ │ ├── case1.dot
│ │ │ ├── case2.dot
│ │ │ ├── empty.dot
│ │ │ ├── subgraph1.dot
│ │ │ ├── subgraph2.dot
│ │ │ ├── subgraph3.dot
│ │ │ └── subgraph4.dot
│ │ ├── harness_tests/
│ │ │ ├── README.md
│ │ │ ├── check/
│ │ │ │ ├── excess_inputs/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── hash_mismatch/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ └── deptest.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── hash_version_mismatch/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ └── deptest.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── missing_and_excess/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── missing_inputs/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── noverify/
│ │ │ │ │ ├── hash_mismatch/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ │ └── deptest.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hash_version_mismatch/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ │ └── deptest.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── missing_and_excess/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── unmet_constraint/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── unmet_override/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── vendororphans/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ ├── foo
│ │ │ │ │ │ ├── github.com/
│ │ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ │ └── deptest.go
│ │ │ │ │ │ └── orphdir/
│ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── pruneopts_changed/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ └── deptest.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── unmet_constraint/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── unmet_override/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ └── vendororphans/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ ├── main.go
│ │ │ │ │ └── vendor/
│ │ │ │ │ ├── foo
│ │ │ │ │ ├── github.com/
│ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ └── deptest.go
│ │ │ │ │ └── orphdir/
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── stdout.txt
│ │ │ │ └── testcase.json
│ │ │ ├── ensure/
│ │ │ │ ├── add/
│ │ │ │ │ ├── all-new/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── all-new-double/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── all-new-double-spec/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── all-new-spec/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── desync/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── errs/
│ │ │ │ │ │ ├── double-diff-spec/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ ├── exists/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ ├── exists-manifest/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ ├── noarg/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ └── self-add/
│ │ │ │ │ │ ├── case1/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ └── case2/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── exists-imports/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── exists-manifest-constraint/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── default/
│ │ │ │ │ ├── errs/
│ │ │ │ │ │ ├── lockless-vendoronly/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ └── specargs/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hasheq/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hasheq-dry/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hasheq-novendor/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hasheq-novendor-dry/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hashneq-vendoronly/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── nocode-vendoronly/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── empty/
│ │ │ │ │ ├── case1/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── case2/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── case3/
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── samples/
│ │ │ │ │ │ └── samples.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── noverify/
│ │ │ │ │ ├── hash_mismatch/
│ │ │ │ │ │ ├── README
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ │ ├── deptest.go
│ │ │ │ │ │ │ └── extrafile
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── vendororphans/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ ├── foo
│ │ │ │ │ │ ├── github.com/
│ │ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ │ └── deptest.go
│ │ │ │ │ │ └── orphdir/
│ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── pkg-errors/
│ │ │ │ │ ├── case1/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── case2/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── bar/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── baz/
│ │ │ │ │ │ └── .gitignore
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── pkg-ignored/
│ │ │ │ │ ├── wildcard-ignore/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ │ └── samples/
│ │ │ │ │ │ │ ├── samples.go
│ │ │ │ │ │ │ └── subsamples/
│ │ │ │ │ │ │ └── subsamples.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── wildcard-other-root/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── samples/
│ │ │ │ │ │ ├── samples.go
│ │ │ │ │ │ └── subsamples/
│ │ │ │ │ │ └── subsamples.go
│ │ │ │ │ └── testcase.json
│ │ │ │ └── update/
│ │ │ │ ├── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── desync/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── errs/
│ │ │ │ │ ├── lockless/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── nonroot-arg/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── not-in-lock/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── spec-with-constraint/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── spec-with-source/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ └── novendor/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ └── testcase.json
│ │ │ ├── init/
│ │ │ │ ├── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── foo/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── case2/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── foo/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── case3/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── foo/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── case4/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── foo/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── glide/
│ │ │ │ │ ├── case1/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ │ └── samples/
│ │ │ │ │ │ │ └── samples.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── case2/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── case3/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── case4/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── corrupt-glide/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── direct-trans-conflict/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── direct-trans-no-conflict/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── trans-trans/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── trans-trans-conflict/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json.ignore
│ │ │ │ │ ├── trans-trans-trans/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── trans-trans-unspecified/
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── glock/
│ │ │ │ │ └── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── GLOCKFILE
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── godep/
│ │ │ │ │ └── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Godeps/
│ │ │ │ │ │ │ └── Godeps.json
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── govend/
│ │ │ │ │ └── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor.yml
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── govendor/
│ │ │ │ │ └── case1/
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ ├── samples/
│ │ │ │ │ │ │ └── samples.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ └── vendor.json
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── gvt/
│ │ │ │ │ └── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ └── manifest
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── manifest-exists/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── relative_path/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── project_dir/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ └── project_dir/
│ │ │ │ │ │ ├── foo/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── skip-hidden/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── .foo/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── _foo/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── lib.go
│ │ │ │ │ │ └── testdata/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── usage/
│ │ │ │ │ ├── with_h_flag/
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── with_not_defined_flag/
│ │ │ │ │ └── testcase.json
│ │ │ │ └── vndr/
│ │ │ │ └── case1/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── main.go
│ │ │ │ │ └── vendor.conf
│ │ │ │ └── testcase.json
│ │ │ └── status/
│ │ │ ├── case1/
│ │ │ │ ├── dot/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── json/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── table/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ └── template/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ ├── stdout.txt
│ │ │ │ └── testcase.json
│ │ │ ├── missing_pkgs_lock_mismatch/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ └── testcase.json
│ │ │ ├── old_constraints/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ ├── stdout.txt
│ │ │ │ └── testcase.json
│ │ │ ├── override_constraint/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ ├── stdout.txt
│ │ │ │ └── testcase.json
│ │ │ ├── revision_constraint/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ ├── stdout.txt
│ │ │ │ └── testcase.json
│ │ │ └── without_lock/
│ │ │ ├── final/
│ │ │ │ └── Gopkg.toml
│ │ │ ├── initial/
│ │ │ │ └── Gopkg.toml
│ │ │ └── testcase.json
│ │ ├── init/
│ │ │ └── directdeps/
│ │ │ └── main.go
│ │ └── status/
│ │ └── collect_constraints/
│ │ └── main.go
│ └── version.go
├── context.go
├── context_test.go
├── doc.go
├── docs/
│ ├── FAQ.md
│ ├── Gopkg.lock.md
│ ├── Gopkg.toml.md
│ ├── daily-dep.md
│ ├── deduction.md
│ ├── ensure-mechanics.md
│ ├── env-vars.md
│ ├── failure-modes.md
│ ├── glossary.md
│ ├── installation.md
│ ├── introduction.md
│ ├── migrating.md
│ ├── new-project.md
│ ├── the-solver.md
│ └── uninstalling.md
├── gps/
│ ├── _testdata/
│ │ ├── badrepo/
│ │ │ └── README.md
│ │ ├── cmd/
│ │ │ ├── echosleep/
│ │ │ │ └── echosleep.go
│ │ │ └── stdout_stderr/
│ │ │ └── stdout_stderr.go
│ │ ├── digest/
│ │ │ ├── github.com/
│ │ │ │ ├── alice/
│ │ │ │ │ ├── match/
│ │ │ │ │ │ └── match.go
│ │ │ │ │ ├── mismatch/
│ │ │ │ │ │ └── mismatch.go
│ │ │ │ │ └── notInLock/
│ │ │ │ │ └── notInLock.go
│ │ │ │ └── bob/
│ │ │ │ ├── emptyDigest/
│ │ │ │ │ └── emptyDigest.go
│ │ │ │ └── match/
│ │ │ │ └── match.go
│ │ │ └── launchpad.net/
│ │ │ └── match/
│ │ │ └── match.go
│ │ └── src/
│ │ ├── bad/
│ │ │ └── bad.go
│ │ ├── buildtag/
│ │ │ └── invalid.go
│ │ ├── canon_confl/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── canonical/
│ │ │ ├── main.go
│ │ │ └── sub/
│ │ │ └── sub.go
│ │ ├── cycle/
│ │ │ ├── a.go
│ │ │ ├── one/
│ │ │ │ └── a.go
│ │ │ └── two/
│ │ │ └── a.go
│ │ ├── disallow/
│ │ │ ├── a.go
│ │ │ └── testdata/
│ │ │ └── another.go
│ │ ├── dotgodir/
│ │ │ ├── .go/
│ │ │ │ ├── .gitkeep
│ │ │ │ └── dot.go
│ │ │ ├── .m1p/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ └── foo.go/
│ │ │ ├── .gitkeep
│ │ │ └── foo.go
│ │ ├── doublenest/
│ │ │ ├── a.go
│ │ │ └── namemismatch/
│ │ │ ├── m1p/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ └── nm.go
│ │ ├── empty/
│ │ │ └── .gitkeep
│ │ ├── github.com/
│ │ │ └── example/
│ │ │ └── varied/
│ │ │ ├── locals.go
│ │ │ ├── m1p/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ ├── main.go
│ │ │ ├── namemismatch/
│ │ │ │ └── nm.go
│ │ │ ├── otherpath/
│ │ │ │ └── otherpath_test.go
│ │ │ └── simple/
│ │ │ ├── another/
│ │ │ │ ├── another.go
│ │ │ │ ├── another_test.go
│ │ │ │ └── locals.go
│ │ │ ├── locals.go
│ │ │ └── simple.go
│ │ ├── igmain/
│ │ │ ├── a.go
│ │ │ └── igmain.go
│ │ ├── igmainfirst/
│ │ │ ├── igmain.go
│ │ │ └── z.go
│ │ ├── igmainlong/
│ │ │ ├── a.go
│ │ │ └── igmain.go
│ │ ├── igmaint/
│ │ │ ├── a.go
│ │ │ ├── igmain.go
│ │ │ └── t_test.go
│ │ ├── m1p/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── missing/
│ │ │ ├── a.go
│ │ │ └── m1p/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── nest/
│ │ │ ├── a.go
│ │ │ └── m1p/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── relimport/
│ │ │ ├── a.go
│ │ │ ├── dot/
│ │ │ │ └── a.go
│ │ │ ├── dotdot/
│ │ │ │ └── a.go
│ │ │ ├── dotdotslash/
│ │ │ │ └── a.go
│ │ │ └── dotslash/
│ │ │ └── a.go
│ │ ├── ren/
│ │ │ ├── m1p/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ └── simple/
│ │ │ └── a.go
│ │ ├── simple/
│ │ │ └── a.go
│ │ ├── simpleallt/
│ │ │ ├── a.go
│ │ │ ├── a_test.go
│ │ │ └── t_test.go
│ │ ├── simplet/
│ │ │ ├── a.go
│ │ │ └── t_test.go
│ │ ├── simplext/
│ │ │ ├── a.go
│ │ │ └── a_test.go
│ │ ├── skip_/
│ │ │ ├── _a.go
│ │ │ └── a.go
│ │ ├── slash-star_confl/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── t/
│ │ │ └── t_test.go
│ │ ├── twopkgs/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── varied/
│ │ │ ├── locals.go
│ │ │ ├── m1p/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ ├── main.go
│ │ │ ├── namemismatch/
│ │ │ │ └── nm.go
│ │ │ ├── otherpath/
│ │ │ │ └── otherpath_test.go
│ │ │ └── simple/
│ │ │ ├── another/
│ │ │ │ ├── another.go
│ │ │ │ ├── another_test.go
│ │ │ │ └── locals.go
│ │ │ ├── locals.go
│ │ │ └── simple.go
│ │ ├── varied_hidden/
│ │ │ ├── .onlyfromtests/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ ├── _frommain/
│ │ │ │ └── a.go
│ │ │ ├── _never/
│ │ │ │ └── a.go
│ │ │ ├── _secondorder/
│ │ │ │ └── secondorder.go
│ │ │ ├── always/
│ │ │ │ └── always_test.go
│ │ │ ├── dotdotslash/
│ │ │ │ └── a.go
│ │ │ ├── locals.go
│ │ │ ├── main.go
│ │ │ └── simple/
│ │ │ ├── locals.go
│ │ │ ├── simple.go
│ │ │ └── testdata/
│ │ │ └── another.go
│ │ └── xt/
│ │ └── a_test.go
│ ├── bridge.go
│ ├── cmd.go
│ ├── cmd_unix.go
│ ├── cmd_windows.go
│ ├── constraint.go
│ ├── constraint_test.go
│ ├── deduce.go
│ ├── deduce_test.go
│ ├── discovery.go
│ ├── doc.go
│ ├── error.go
│ ├── example.go
│ ├── filesystem.go
│ ├── filesystem_test.go
│ ├── identifier.go
│ ├── internal/
│ │ └── pb/
│ │ ├── pb.go
│ │ ├── source_cache.pb.go
│ │ └── source_cache.proto
│ ├── lock.go
│ ├── lock_test.go
│ ├── manager_test.go
│ ├── manifest.go
│ ├── manifest_test.go
│ ├── maybe_source.go
│ ├── maybe_source_test.go
│ ├── metrics.go
│ ├── paths/
│ │ ├── paths.go
│ │ └── paths_test.go
│ ├── pkgtree/
│ │ ├── ignored_ruleset.go
│ │ ├── ignored_ruleset_test.go
│ │ ├── pkgtree.go
│ │ ├── pkgtree_test.go
│ │ └── reachmap.go
│ ├── prune.go
│ ├── prune_test.go
│ ├── rootdata.go
│ ├── rootdata_test.go
│ ├── satisfy.go
│ ├── selection.go
│ ├── selection_test.go
│ ├── solution.go
│ ├── solution_test.go
│ ├── solve_basic_test.go
│ ├── solve_bimodal_test.go
│ ├── solve_failures.go
│ ├── solve_test.go
│ ├── solver.go
│ ├── solver_inputs_test.go
│ ├── source.go
│ ├── source_cache.go
│ ├── source_cache_bolt.go
│ ├── source_cache_bolt_encode.go
│ ├── source_cache_bolt_encode_test.go
│ ├── source_cache_bolt_test.go
│ ├── source_cache_multi.go
│ ├── source_cache_test.go
│ ├── source_errors.go
│ ├── source_errors_test.go
│ ├── source_manager.go
│ ├── source_manager_test.go
│ ├── source_test.go
│ ├── strings.go
│ ├── trace.go
│ ├── typed_radix.go
│ ├── typed_radix_test.go
│ ├── vcs_repo.go
│ ├── vcs_repo_test.go
│ ├── vcs_source.go
│ ├── vcs_source_test.go
│ ├── vcs_version.go
│ ├── vcs_version_test.go
│ ├── verify/
│ │ ├── digest.go
│ │ ├── digest_test.go
│ │ ├── helper_types_test.go
│ │ ├── lock.go
│ │ ├── lockdiff.go
│ │ ├── lockdiff_test.go
│ │ ├── locksat.go
│ │ └── locksat_test.go
│ ├── version.go
│ ├── version_queue.go
│ ├── version_queue_test.go
│ └── version_test.go
├── hack/
│ ├── build-all.bash
│ ├── coverage.bash
│ ├── licenseok/
│ │ └── main.go
│ ├── lint.bash
│ ├── test.bash
│ ├── validate-gofmt.bash
│ └── validate-licence.bash
├── install.sh
├── internal/
│ ├── feedback/
│ │ ├── feedback.go
│ │ ├── feedback_test.go
│ │ ├── lockdiff.go
│ │ └── lockdiff_test.go
│ ├── fs/
│ │ ├── fs.go
│ │ ├── fs_test.go
│ │ ├── rename.go
│ │ ├── rename_windows.go
│ │ └── testdata/
│ │ └── test.file
│ ├── importers/
│ │ ├── base/
│ │ │ ├── importer.go
│ │ │ └── importer_test.go
│ │ ├── glide/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── glide.yaml
│ │ │ └── golden.txt
│ │ ├── glock/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── GLOCKFILE
│ │ │ └── golden.txt
│ │ ├── godep/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── Godeps.json
│ │ │ └── golden.txt
│ │ ├── govend/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── golden.txt
│ │ │ └── vendor.yml
│ │ ├── govendor/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── golden.txt
│ │ │ └── vendor.json
│ │ ├── gvt/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── golden.txt
│ │ │ └── manifest
│ │ ├── importers.go
│ │ ├── importertest/
│ │ │ ├── testcase.go
│ │ │ └── testdata.go
│ │ └── vndr/
│ │ ├── importer.go
│ │ ├── importer_test.go
│ │ └── testdata/
│ │ ├── golden.txt
│ │ └── vendor.conf
│ └── test/
│ ├── integration/
│ │ ├── testcase.go
│ │ └── testproj.go
│ ├── test.go
│ └── writer.go
├── lock.go
├── lock_test.go
├── manifest.go
├── manifest_test.go
├── project.go
├── project_test.go
├── test_project_context_test.go
├── testdata/
│ ├── analyzer/
│ │ └── Gopkg.toml
│ ├── lock/
│ │ ├── error0.toml
│ │ ├── error1.toml
│ │ ├── error2.toml
│ │ ├── golden0.toml
│ │ └── golden1.toml
│ ├── manifest/
│ │ ├── error1.toml
│ │ ├── error2.toml
│ │ ├── error3.toml
│ │ └── golden.toml
│ ├── rootfind/
│ │ ├── Gopkg.toml
│ │ └── subdir/
│ │ └── .gitkeep
│ └── txn_writer/
│ ├── badinput_fileroot
│ ├── expected_diff_output.txt
│ ├── expected_lock.toml
│ └── expected_manifest.toml
├── txn_writer.go
├── txn_writer_test.go
├── vendor/
│ ├── github.com/
│ │ ├── Masterminds/
│ │ │ ├── semver/
│ │ │ │ ├── LICENSE.txt
│ │ │ │ ├── collection.go
│ │ │ │ ├── constraints.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── error.go
│ │ │ │ ├── magic.go
│ │ │ │ ├── parse.go
│ │ │ │ ├── range.go
│ │ │ │ ├── union.go
│ │ │ │ └── version.go
│ │ │ └── vcs/
│ │ │ ├── LICENSE.txt
│ │ │ ├── bzr.go
│ │ │ ├── errors.go
│ │ │ ├── git.go
│ │ │ ├── hg.go
│ │ │ ├── repo.go
│ │ │ ├── svn.go
│ │ │ ├── vcs_local_lookup.go
│ │ │ └── vcs_remote_lookup.go
│ │ ├── armon/
│ │ │ └── go-radix/
│ │ │ ├── LICENSE
│ │ │ └── radix.go
│ │ ├── boltdb/
│ │ │ └── bolt/
│ │ │ ├── LICENSE
│ │ │ ├── bolt_386.go
│ │ │ ├── bolt_amd64.go
│ │ │ ├── bolt_arm.go
│ │ │ ├── bolt_arm64.go
│ │ │ ├── bolt_linux.go
│ │ │ ├── bolt_openbsd.go
│ │ │ ├── bolt_ppc.go
│ │ │ ├── bolt_ppc64.go
│ │ │ ├── bolt_ppc64le.go
│ │ │ ├── bolt_s390x.go
│ │ │ ├── bolt_unix.go
│ │ │ ├── bolt_unix_solaris.go
│ │ │ ├── bolt_windows.go
│ │ │ ├── boltsync_unix.go
│ │ │ ├── bucket.go
│ │ │ ├── cursor.go
│ │ │ ├── db.go
│ │ │ ├── doc.go
│ │ │ ├── errors.go
│ │ │ ├── freelist.go
│ │ │ ├── node.go
│ │ │ ├── page.go
│ │ │ └── tx.go
│ │ ├── golang/
│ │ │ └── protobuf/
│ │ │ ├── AUTHORS
│ │ │ ├── CONTRIBUTORS
│ │ │ ├── LICENSE
│ │ │ └── proto/
│ │ │ ├── clone.go
│ │ │ ├── decode.go
│ │ │ ├── discard.go
│ │ │ ├── encode.go
│ │ │ ├── equal.go
│ │ │ ├── extensions.go
│ │ │ ├── lib.go
│ │ │ ├── message_set.go
│ │ │ ├── pointer_reflect.go
│ │ │ ├── pointer_unsafe.go
│ │ │ ├── properties.go
│ │ │ ├── text.go
│ │ │ └── text_parser.go
│ │ ├── google/
│ │ │ └── go-cmp/
│ │ │ ├── LICENSE
│ │ │ └── cmp/
│ │ │ ├── compare.go
│ │ │ ├── internal/
│ │ │ │ ├── diff/
│ │ │ │ │ ├── debug_disable.go
│ │ │ │ │ ├── debug_enable.go
│ │ │ │ │ └── diff.go
│ │ │ │ ├── function/
│ │ │ │ │ └── func.go
│ │ │ │ └── value/
│ │ │ │ ├── format.go
│ │ │ │ └── sort.go
│ │ │ ├── options.go
│ │ │ ├── path.go
│ │ │ ├── reporter.go
│ │ │ ├── unsafe_panic.go
│ │ │ └── unsafe_reflect.go
│ │ ├── jmank88/
│ │ │ └── nuts/
│ │ │ ├── LICENSE
│ │ │ ├── key.go
│ │ │ ├── nuts.go
│ │ │ ├── paths.go
│ │ │ └── types.go
│ │ ├── nightlyone/
│ │ │ └── lockfile/
│ │ │ ├── LICENSE
│ │ │ ├── lockfile.go
│ │ │ ├── lockfile_unix.go
│ │ │ └── lockfile_windows.go
│ │ ├── pelletier/
│ │ │ └── go-toml/
│ │ │ ├── LICENSE
│ │ │ ├── doc.go
│ │ │ ├── fuzz.go
│ │ │ ├── keysparsing.go
│ │ │ ├── lexer.go
│ │ │ ├── marshal.go
│ │ │ ├── parser.go
│ │ │ ├── position.go
│ │ │ ├── token.go
│ │ │ ├── toml.go
│ │ │ ├── tomltree_create.go
│ │ │ └── tomltree_write.go
│ │ ├── pkg/
│ │ │ └── errors/
│ │ │ ├── LICENSE
│ │ │ ├── errors.go
│ │ │ └── stack.go
│ │ └── sdboyer/
│ │ └── constext/
│ │ ├── LICENSE
│ │ └── constext.go
│ ├── golang.org/
│ │ └── x/
│ │ ├── net/
│ │ │ ├── AUTHORS
│ │ │ ├── CONTRIBUTORS
│ │ │ ├── LICENSE
│ │ │ ├── PATENTS
│ │ │ └── context/
│ │ │ ├── context.go
│ │ │ ├── go17.go
│ │ │ ├── go19.go
│ │ │ ├── pre_go17.go
│ │ │ └── pre_go19.go
│ │ ├── sync/
│ │ │ ├── AUTHORS
│ │ │ ├── CONTRIBUTORS
│ │ │ ├── LICENSE
│ │ │ ├── PATENTS
│ │ │ └── errgroup/
│ │ │ └── errgroup.go
│ │ └── sys/
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ └── unix/
│ │ ├── asm_darwin_386.s
│ │ ├── asm_darwin_amd64.s
│ │ ├── asm_darwin_arm.s
│ │ ├── asm_darwin_arm64.s
│ │ ├── asm_dragonfly_amd64.s
│ │ ├── asm_freebsd_386.s
│ │ ├── asm_freebsd_amd64.s
│ │ ├── asm_freebsd_arm.s
│ │ ├── asm_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_mipsx.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_netbsd_386.s
│ │ ├── asm_netbsd_amd64.s
│ │ ├── asm_netbsd_arm.s
│ │ ├── asm_openbsd_386.s
│ │ ├── asm_openbsd_amd64.s
│ │ ├── asm_openbsd_arm.s
│ │ ├── asm_solaris_amd64.s
│ │ ├── bluetooth_linux.go
│ │ ├── cap_freebsd.go
│ │ ├── constants.go
│ │ ├── dev_linux.go
│ │ ├── dirent.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── env_unix.go
│ │ ├── env_unset.go
│ │ ├── errors_freebsd_386.go
│ │ ├── errors_freebsd_amd64.go
│ │ ├── errors_freebsd_arm.go
│ │ ├── file_unix.go
│ │ ├── flock.go
│ │ ├── flock_linux_32bit.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── gccgo_linux_sparc64.go
│ │ ├── mkpost.go
│ │ ├── openbsd_pledge.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_386.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_amd64.go
│ │ ├── syscall_linux_amd64_gc.go
│ │ ├── syscall_linux_arm.go
│ │ ├── syscall_linux_arm64.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.go
│ │ ├── syscall_linux_ppc64x.go
│ │ ├── syscall_linux_s390x.go
│ │ ├── syscall_linux_sparc64.go
│ │ ├── syscall_netbsd.go
│ │ ├── syscall_netbsd_386.go
│ │ ├── syscall_netbsd_amd64.go
│ │ ├── syscall_netbsd_arm.go
│ │ ├── syscall_no_getwd.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── types_darwin.go
│ │ ├── types_dragonfly.go
│ │ ├── types_freebsd.go
│ │ ├── types_netbsd.go
│ │ ├── types_openbsd.go
│ │ ├── types_solaris.go
│ │ ├── zerrors_darwin_386.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_linux_sparc64.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_openbsd_arm.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zsyscall_darwin_386.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_arm.go
│ │ ├── zsyscall_darwin_arm64.go
│ │ ├── zsyscall_dragonfly_amd64.go
│ │ ├── zsyscall_freebsd_386.go
│ │ ├── zsyscall_freebsd_amd64.go
│ │ ├── zsyscall_freebsd_arm.go
│ │ ├── zsyscall_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.go
│ │ ├── zsyscall_linux_ppc64.go
│ │ ├── zsyscall_linux_ppc64le.go
│ │ ├── zsyscall_linux_s390x.go
│ │ ├── zsyscall_linux_sparc64.go
│ │ ├── zsyscall_netbsd_386.go
│ │ ├── zsyscall_netbsd_amd64.go
│ │ ├── zsyscall_netbsd_arm.go
│ │ ├── zsyscall_openbsd_386.go
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_openbsd_arm.go
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsysctl_openbsd.go
│ │ ├── zsysnum_darwin_386.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm.go
│ │ ├── zsysnum_darwin_arm64.go
│ │ ├── zsysnum_dragonfly_amd64.go
│ │ ├── zsysnum_freebsd_386.go
│ │ ├── zsysnum_freebsd_amd64.go
│ │ ├── zsysnum_freebsd_arm.go
│ │ ├── zsysnum_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.go
│ │ ├── zsysnum_linux_ppc64.go
│ │ ├── zsysnum_linux_ppc64le.go
│ │ ├── zsysnum_linux_s390x.go
│ │ ├── zsysnum_linux_sparc64.go
│ │ ├── zsysnum_netbsd_386.go
│ │ ├── zsysnum_netbsd_amd64.go
│ │ ├── zsysnum_netbsd_arm.go
│ │ ├── zsysnum_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_openbsd_arm.go
│ │ ├── zsysnum_solaris_amd64.go
│ │ ├── ztypes_darwin_386.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_linux_sparc64.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ └── ztypes_solaris_amd64.go
│ └── gopkg.in/
│ └── yaml.v2/
│ ├── LICENSE
│ ├── LICENSE.libyaml
│ ├── apic.go
│ ├── decode.go
│ ├── emitterc.go
│ ├── encode.go
│ ├── parserc.go
│ ├── readerc.go
│ ├── resolve.go
│ ├── scannerc.go
│ ├── sorter.go
│ ├── writerc.go
│ ├── yaml.go
│ ├── yamlh.go
│ └── yamlprivateh.go
└── website/
├── .gitignore
├── blog/
│ ├── 2018-01-23-announce-v0.4.0.md
│ └── 2018-07-25-announce-v0.5.0.md
├── core/
│ └── Footer.js
├── i18n/
│ └── en.json
├── package.json
├── pages/
│ └── en/
│ ├── help.js
│ ├── index.js
│ └── users.js
├── sidebars.json
├── siteConfig.js
└── static/
└── css/
└── custom.css
================================================
FILE CONTENTS
================================================
================================================
FILE: .codeclimate.yml
================================================
version: "2"
checks:
argument-count:
enabled: false
complex-logic:
enabled: false
file-lines:
enabled: false
method-complexity:
enabled: false
method-count:
enabled: false
method-lines:
enabled: false
nested-control-flow:
enabled: false
return-statements:
enabled: false
similar-code:
enabled: false
identical-code:
enabled: false
plugins:
gofmt:
# Codeclimate go fmt does not agree with tip go fmt; consider re-enabling
# CC when the advice matches up with tip again.
enabled: false
govet:
enabled: true
golint:
enabled: true
exclude_paths:
- vendor/
- gps/_testdata
- cmd/dep/testdata
- testdata
- gps/internal/pb
================================================
FILE: .gitattributes
================================================
# Prevent problems comparing golden files on Windows
**/testdata/** text eol=lf
================================================
FILE: .github/CODEOWNERS
================================================
# general
* @sdboyer
# init
/cmd/dep/init* @carolynvs
/cmd/dep/gopath_scanner* @carolynvs
/cmd/dep/root_analyzer* @carolynvs
/cmd/dep/testdata/init @carolynvs
/cmd/dep/testdata/harness_tests/init @carolynvs
/internal/importers @carolynvs
/analyzer* @carolynvs
/testdata/analyzer @carolynvs
/internal/feedback @carolynvs
# ensure
/cmd/dep/ensure* @ibrasho
/cmd/dep/testdata/harness_tests/ensure** @ibrasho
# status
/cmd/dep/status* @darkowlzz
/cmd/dep/testdata/harness_tests/status** @darkowlzz
/cmd/dep/graphviz* @darkowlzz
# gps components
/gps/source* @jmank88
/gps/constraint* @jmank88
/gps/version* @jmank88
/gps/vcs* @jmank88
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
<!--
Thanks for filing an issue! If this is a question or feature request, just delete
everything here and write out the request, providing as much context as you can.
-->
### What version of `dep` are you using (`dep version`)?
<!--
If you installed `dep` via `go get`, report the version instead with
`cd $GOPATH/src/github.com/golang/dep && git describe --tags`
-->
### What `dep` command did you run?
<!--
Paste the output of the commands you ran in here, making sure to pass -v for maximum context.
-->
### What did you expect to see?
### What did you see instead?
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!--
Work-in-progress PRs are welcome as a way to get early feedback - just prefix
the title with [WIP].
Add the change in the changelog (except for test changes and docs updates).
Please edit CHANGELOG.md and add the change under the appropriate category (NEW
FEATURES, IMPROVEMENTS & BUG FIXES) along with the PR number.
-->
### What does this do / why do we need it?
### What should your reviewer look out for in this PR?
### Do you need help or clarification on anything?
### Which issue(s) does this PR fix?
<!--
fixes #
fixes #
-->
================================================
FILE: .gitignore
================================================
# dep project generated files to ignore
# if you want to ignore files created by your editor/tools,
# please consider a global .gitignore https://help.github.com/articles/ignoring-files
# please do not open a pull request to add something created by your editor or tools
/dep
/testdep
/dep.exe
/licenseok
/profile.out
/coverage.txt
release/
================================================
FILE: .travis.yml
================================================
language: go
sudo: false
dist: xenial
notifications:
email: false
jobs:
include:
- stage: test
go_import_path: github.com/golang/dep
install:
- ssh-keyscan -t $TRAVIS_SSH_KEY_TYPES -H bitbucket.org >> ~/.ssh/known_hosts
- make get-deps
- npm install -g codeclimate-test-reporter
env:
- DEPTESTBYPASS501=1
- TZ=UTC
- GOCACHE=/home/travis/var/cache
os: linux
go: 1.12.x
script:
- make validate test
- ./hack/coverage.bash
after_success:
- codeclimate-test-reporter < coverage.txt
# YAML alias, for settings shared across the simpler builds
- &simple-test
go: 1.11.x
stage: test
go_import_path: github.com/golang/dep
install:
- ssh-keyscan -t $TRAVIS_SSH_KEY_TYPES -H bitbucket.org >> ~/.ssh/known_hosts
env:
- DEPTESTBYPASS501=1
- TZ=UTC
script:
- make test
- <<: *simple-test
go: 1.9.x
- <<: *simple-test
go: tip
install:
- ssh-keyscan -t $TRAVIS_SSH_KEY_TYPES -H bitbucket.org >> ~/.ssh/known_hosts
- mkdir -p /home/travis/var/cache
env:
- GOCACHE=/home/travis/var/cache
- DEPTESTBYPASS501=1
- TZ=UTC
- <<: *simple-test
os: osx
go: 1.12.x
install:
# brew takes horribly long to update itself despite the above caching
# attempt; only bzr install if it's not on the $PATH
- ssh-keyscan -t $TRAVIS_SSH_KEY_TYPES -H bitbucket.org >> ~/.ssh/known_hosts
- test $(which bzr) || brew install bzr
env:
- HOMEBREW_NO_AUTO_UPDATE=1
- DEPTESTBYPASS501=1
- TZ=UTC
- GOCACHE=/Users/travis/var/cache
script:
# OSX as of El Capitan sets an exit trap that interacts poorly with how
# travis seems to spawn these shells; if set -e is set, then it can cause
# build failures. We're not doing that here, but retain the trap statement
# for future safety.
# Related: https://superuser.com/questions/1044130/why-am-i-having-how-can-i-fix-this-error-shell-session-update-command-not-f
- trap EXIT
- make test
- go: 1.12.x
# Run on OS X so that we get a CGO-enabled binary for this OS; see
# https://github.com/golang/dep/issues/1838 for more details.
os: osx
stage: deploy
go_import_path: github.com/golang/dep
install:
- ssh-keyscan -t $TRAVIS_SSH_KEY_TYPES -H bitbucket.org >> ~/.ssh/known_hosts
script:
- skip
before_deploy:
- ./hack/build-all.bash
deploy:
- provider: releases
api_key:
secure: fL9GX11J3JLizEBTPZHN32wuAT91eAJsGl0kjlAdIc6Lb/9UCe1XZGgFnpQFN4qo/S+omhHBDbM6Ty1xhNy7xmjDecpQGDU8Rmap9Oll0TuxqMigG+njOuPp5VUYPofPP0PGKdxAcYg+KaFM7x0o2rK+qA046NHwo2gH1BbE+bn55TZglEajEfc8j9iX4jt96KC7zlu+WiKArLmfUtlrI8m8ZYgbYcvFmlYjeCiEqlNhvNL59ejug9Rl0PLtPbamqVXkGLafYtekgPCb4WSxBiCt8pq5Rb5svk9YcdXpiaWQhZjMPAuKN6BrmN2lw1PiXzADUG5fjvNc8eo2HY70GD2utU9cAsY8VIafhoH5n6uM1WI8MHwDfd7P1PiQA3ZGQ8CPwk4q/8HSfQU9ap7vZgSF63pTIbtlviyIG67orOJE9PWWncl9olYM946UylZu6m3hWI/rmJxOeJ1UJjym/3GNPMRfKubaGhV/TyRdM0bKX4M0cXHU6k/ESVFupGXdKRt4RpvkD4/1Km6b2OShW6PNI+ifFspnJr7obkI7dm7ubySdnNz4lMv9WWymxRpMVc8hUAhuoDvXeZJq7pSnkjBEWDxIRoTkA93CU3/Rf7MFYCJMnGSqjcxWUpIfCAk2/r4BqL9NQnqBvvVt+MYi64QaD5n7ZF3dVbr6HZ2zjSU=
file:
- release/dep-linux-amd64
- release/dep-linux-amd64.sha256
- release/dep-darwin-amd64
- release/dep-darwin-amd64.sha256
- release/dep-freebsd-amd64
- release/dep-freebsd-amd64.sha256
- release/dep-windows-amd64.exe
- release/dep-windows-amd64.exe.sha256
- release/dep-linux-386
- release/dep-linux-386.sha256
- release/dep-darwin-386
- release/dep-darwin-386.sha256
- release/dep-freebsd-386
- release/dep-freebsd-386.sha256
- release/dep-windows-386.exe
- release/dep-windows-386.exe.sha256
- release/dep-linux-ppc64
- release/dep-linux-ppc64.sha256
- release/dep-linux-ppc64le
- release/dep-linux-ppc64le.sha256
- release/dep-linux-s390x
- release/dep-linux-s390x.sha256
- release/dep-linux-arm
- release/dep-linux-arm.sha256
- release/dep-linux-arm64
- release/dep-linux-arm64.sha256
skip_cleanup: true
on:
repo: golang/dep
branch: master
tags: true
addons:
ssh_known_hosts: github.com
================================================
FILE: AUTHORS
================================================
# This source code refers to The Go Authors for copyright purposes.
# The master list of authors is in the main Go distribution,
# visible at http://tip.golang.org/AUTHORS.
================================================
FILE: CHANGELOG.md
================================================
# v0.5.4
Released on June 13, 2019. We are [looking for
sponsors!](https://github.com/golang/dep/issues/2165)
- Fix an error in the TOML example for the Gopkg.toml documentation.
([#2174][2174])
- Fix error when cleaning up git submodules with newer versions of git. Thanks
@geearu for the fix. ([#2168][2168], [#2176][2176])
[2168]: https://github.com/golang/dep/pull/2168
[2174]: https://github.com/golang/dep/pull/2174
[2176]: https://github.com/golang/dep/pull/2176
# v0.5.3
Released on May 13, 2019
0.5.2 was released without a "v" prefix on the tag. The contents of this release
are identical to 0.5.2.
# 0.5.2
Released on May 8, 2019
IMPROVEMENTS:
* Dep will read a netrc file now, which should allow you to authenticate against
Gitlab and other private repositories that require basic auth. ([#2155][2155])
* Ignore "mod" VCS type in parseMetaGoImports ([#2152][2152])
* Use correct filename for ARM releases.
# v0.5.1
Released on February 16, 2019
IMPROVEMENTS:
* Add CI tests against go1.11.
* Fix indefinite hang cloning Git repositories that failed fsck checks. ([#2070][2070])
* The `noverify` field in `Gopkg.toml` allows for the preservation of excess files under `vendor`. ([#2002](https://github.com/golang/dep/issue/2002))
* Add releases for `arm`, `armv6` ([#2102][2102]), `s390x` ([#2070][2070]), and `ppc` architectures.
* Fix handling of cyclic import graphs ([#2003][2003]).
* Fix error in preservation of vendor/.git ([#2000][2000]).
* Fix an edge case in lockdiff where all the projects may be removed from the lock file ([#1972][1972]).
* Fix panic related to projects. ([#1945][1945])
[2102]: https://github.com/golang/dep/pull/2102
[2070]: https://github.com/golang/dep/pull/2070
[2000]: https://github.com/golang/dep/pull/2000
[1981]: https://github.com/golang/dep/pull/1981
[2003]: https://github.com/golang/dep/pull/2003
[1972]: https://github.com/golang/dep/pull/1972
[1945]: https://github.com/golang/dep/pull/1945
BUG FIXES:
* Correctly handle certain cases where `dep ensure` removed projects from Gopkg.lock. ([#1945](https://github.com/golang/dep/issue/1945)).
# v0.5.0
NEW FEATURES:
* Add CI tests against go1.10. Drop support for go1.8. ([#1620](https://github.com/golang/dep/pull/1620)).
* Added `install.sh` script. ([#1533](https://github.com/golang/dep/pull/1533)).
* List out of date projects in dep status ([#1553](https://github.com/golang/dep/pull/1553)).
* Enabled opt-in persistent caching via `DEPCACHEAGE` env var. ([#1711](https://github.com/golang/dep/pull/1711)).
* Allow `DEPPROJECTROOT` [environment variable](https://golang.github.io/dep/docs/env-vars.html#depprojectroot) to supersede GOPATH deduction and explicitly set the current project's [root](https://golang.github.io/dep/docs/glossary.html#project-root) ([#1883](https://github.com/golang/dep/pull/1883)).
* `dep ensure` now explains what changes to the code or Gopkg.toml have induced solving ([#1912](https://github.com/golang/dep/pull/1912)).
* Hash digests of vendor contents are now stored in `Gopkg.lock`, and the contents of vendor are only rewritten on change or hash mismatch ([#1912](https://github.com/golang/dep/pull/1912)).
* Added support for ppc64/ppc64le.
* New subcommand `dep check` quickly reports if imports, Gopkg.toml, Gopkg.lock, and vendor are out of sync ([#1932](https://github.com/golang/dep/pull/1932)).
BUG FIXES:
* Excise certain git-related environment variables. ([#1872](https://github.com/golang/dep/pull/1872))
IMPROVEMENTS:
* Add template operations support in dep status template output ([#1549](https://github.com/golang/dep/pull/1549)).
* Reduce network access by trusting local source information and only pulling from upstream when necessary ([#1250](https://github.com/golang/dep/pull/1250)).
* Update our dependency on Masterminds/semver to follow upstream again now that [Masterminds/semver#67](https://github.com/Masterminds/semver/pull/67) is merged([#1792](https://github.com/golang/dep/pull/1792)).
* `inputs-digest` was removed from `Gopkg.lock` ([#1912](https://github.com/golang/dep/pull/1912)).
* Hash digests of vendor contents are now stored in `Gopkg.lock`, and the contents of vendor are only rewritten on change or hash mismatch ([#1912](https://github.com/golang/dep/pull/1912)).
* Don't exclude `Godeps` folder ([#1822](https://github.com/golang/dep/issues/1822)).
* Add project-package relationship graph support in graphviz ([#1588](https://github.com/golang/dep/pull/1588)).
* Limit concurrency of `dep status` to avoid hitting open file limits ([#1923](https://github.com/golang/dep/issue/1923)).
WIP:
* Enable importing external configuration from dependencies during init (#1277). This is feature flagged and disabled by default.
# v0.4.1
NEW FEATURES:
BUG FIXES:
* Fix per-project prune option handling ([#1570](https://github.com/golang/dep/pull/1570))
# v0.4.0
NEW FEATURES:
* Absorb `dep prune` into `dep ensure`. ([#944](https://github.com/golang/dep/issues/944))
* Add support for importing from [glock](https://github.com/robfig/glock) based projects. ([#1422](https://github.com/golang/dep/pull/1422))
* Add support for importing from [govendor](https://github.com/kardianos/govendor) based projects. ([#815](https://github.com/golang/dep/pull/815))
* Allow override of cache directory location using environment variable `DEPCACHEDIR`. ([#1234](https://github.com/golang/dep/pull/1234))
* Add support for template output in `dep status`. ([#1389](https://github.com/golang/dep/pull/1389))
* Each element in a multi-item TOML array is output on its own line. ([#1461](https://github.com/golang/dep/pull/1461))
BUG FIXES:
* Releases targeting Windows now have a `.exe` suffix. ([#1291](https://github.com/golang/dep/pull/1291))
* Adaptively recover from dirty and corrupted git repositories in cache. ([#1279](https://github.com/golang/dep/pull/1279))
* Suppress git password prompts in more places. ([#1357](https://github.com/golang/dep/pull/1357))
* Fix `-no-vendor` flag for `ensure -update`. ([#1361](https://github.com/golang/dep/pull/1361))
* Validate `git ls-remote` output and ignore all malformed lines. ([#1379](https://github.com/golang/dep/pull/1379))
* Support [gopkg.in version zero](http://labix.org/gopkg.in#VersionZero). ([#1243](https://github.com/golang/dep/pull/1243))
* Fix how dep status print revision constraints. ([#1421](https://github.com/golang/dep/pull/1421))
* Add optional `-v` flag to ensure sub command's syntax. ([#1458](https://github.com/golang/dep/pull/1458))
* Allow URLs containing ports in `Gopkg.toml` `source` fields. ([#1509](https://github.com/golang/dep/pull/1509))
IMPROVEMENTS:
* Log as dependencies are pre-fetched during dep init. ([#1176](https://github.com/golang/dep/pull/1176))
* Make the gps package importable. ([#1349](https://github.com/golang/dep/pull/1349))
* Improve file copy performance by not forcing a file sync. ([#1408](https://github.com/golang/dep/pull/1408))
* Skip empty constraints during import. ([#1414](https://github.com/golang/dep/pull/1349))
* Handle errors when writing status output. ([#1420](https://github.com/golang/dep/pull/1420))
* Add constraint for locked projects in `dep status`. ([#962](https://github.com/golang/dep/pull/962))
* Make external config importers error tolerant. ([#1315](https://github.com/golang/dep/pull/1315))
* Show LATEST and VERSION as the same type in status. ([#1515](https://github.com/golang/dep/pull/1515))
* Warn when [[constraint]] rules that will have no effect. ([#1534](https://github.com/golang/dep/pull/1534))
# v0.3.2
NEW FEATURES:
* Add support for importing from [gvt](https://github.com/FiloSottile/gvt)
and [gb](https://godoc.org/github.com/constabulary/gb/cmd/gb-vendor).
([#1149](https://github.com/golang/dep/pull/1149))
* Wildcard ignore support. ([#1156](https://github.com/golang/dep/pull/1156))
* Disable SourceManager lock by setting `DEPNOLOCK` environment variable.
([#1206](https://github.com/golang/dep/pull/1206))
* `dep ensure -no-vendor -dry-run` now exits with an error when changes would
have to be made to `Gopkg.lock`. This is useful for CI. ([#1256](https://github.com/golang/dep/pull/1256))
BUG FIXES:
* gps: Fix case mismatch error with multiple dependers. ([#1233](https://github.com/golang/dep/pull/1233))
* Skip broken `vendor` symlink rather than returning an error. ([#1191](https://github.com/golang/dep/pull/1191))
* Fix `status` shows incorrect reason for lock mismatch when ignoring packages.
([#1216](https://github.com/golang/dep/pull/1216))
IMPROVEMENTS:
* Allow `dep ensure -add` and `-update` when lock is out-of-sync. ([#1225](https://github.com/golang/dep/pull/1225))
* gps: vcs: Dedupe git version list ([#1212](https://github.com/golang/dep/pull/1212))
* gps: Add prune functions to gps. ([#1020](https://github.com/golang/dep/pull/1020))
* gps: Skip broken vendor symlinks. ([#1191](https://github.com/golang/dep/pull/1191))
* `dep ensure -add` now concurrently fetches the source and adds the projects.
([#1218](https://github.com/golang/dep/pull/1218))
* File name case check is now performed on `Gopkg.toml` and `Gopkg.lock`.
([#1114](https://github.com/golang/dep/pull/1114))
* gps: gps now supports pruning. ([#1020](https://github.com/golang/dep/pull/1020))
* `dep ensure -update` now concurrently validates the passed project arguments.
Improving performance when updating dependencies with `-update`. ([#1175](https://github.com/golang/dep/pull/1175))
* `dep status` now concurrently fetches repo info. Improving status performance.
([#1135](https://github.com/golang/dep/pull/1135))
* gps: Add SourceURLsForPath() to SourceManager. ([#1166](https://github.com/golang/dep/pull/1166))
* gps: Include output in error. ([#1180](https://github.com/golang/dep/pull/1180))
WIP:
* gps: Process canonical import paths. ([#1017](https://github.com/golang/dep/pull/1017))
* gps: Persistent cache. ([#1127](https://github.com/golang/dep/pull/1127), [#1215](https://github.com/golang/dep/pull/1215))
# v0.3.1
* gps: Add satisfiability check for case variants ([#1079](https://github.com/golang/dep/pull/1079))
* Validate Project Roots in manifest ([#1116](https://github.com/golang/dep/pull/1116))
* gps: Properly separate sources for different gopkg.in versions & github
([#1132](https://github.com/golang/dep/pull/1132))
* gps: Add persistent BoltDB cache ([#1098](https://github.com/golang/dep/pull/1098))
* gps: Increase default subcommand timeout to 30s ([#1087](https://github.com/golang/dep/pull/1087))
* Fix importer [issue](https://github.com/golang/dep/issues/939) where the
importer would drop the imported version of a project ([#1100](https://github.com/golang/dep/pull/1100))
* Import analyzer now always uses the same name, fixing the lock mismatch
immediately after dep init issue ([#1099](https://github.com/golang/dep/pull/1099))
* Add support for importing from [govend](https://github.com/govend/govend)
(#1040) and [LK4D4/vndr](https://github.com/LK4D4/vndr) ([#978](https://github.com/golang/dep/pull/978)) based projects
* gps: gps no longer assumes that every git repo has a HEAD ([#1053](https://github.com/golang/dep/pull/1053))
* `os.Chmod` failures on Windows due to long path length has been fixed ([#925](https://github.com/golang/dep/pull/925))
* Add `version` command ([#996](https://github.com/golang/dep/pull/996))
* Drop support for building with go1.7 ([#714](https://github.com/golang/dep/pull/714))
* gps: Parse abbreviated git revisions ([#1027](https://github.com/golang/dep/pull/1027))
* gps: Parallelize writing dep tree ([#1021](https://github.com/golang/dep/pull/1021))
* `status` now shows the progress in verbose mode ([#1009](https://github.com/golang/dep/pull/1009), [#1037](https://github.com/golang/dep/pull/1037))
* Fix empty `Constraint` and `Version` in `status` json output ([#976](https://github.com/golang/dep/pull/976))
* `status` table output now shows override constraints ([#918](https://github.com/golang/dep/pull/918))
* gps: Display warning message every 15 seconds when lockfile is busy ([#958](https://github.com/golang/dep/pull/958))
* gps: Hashing directory tree and tree verification ([#959](https://github.com/golang/dep/pull/959))
* `ensure` now has `-vendor-only` mode to populate vendor/ without updating
Gopkg.lock ([#954](https://github.com/golang/dep/pull/954))
* Use fork of Masterminds/semver until
Masterminds/semver [issue#59](https://github.com/Masterminds/semver/issues/59)
is fixed upstream ([#938](https://github.com/golang/dep/pull/938))
* gps: Ensure packages are deducible before attempting to solve ([#697](https://github.com/golang/dep/pull/697))
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual identity
and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at sam (at) samboyer.org. All complaints
will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is obligated to
maintain confidentiality with regard to the reporter of an incident. Further
details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to `dep`
`dep` is an open source project.
It is the work of hundreds of contributors. We appreciate your help!
Keep an eye on the [Roadmap](https://github.com/golang/dep/wiki/Roadmap) for a summary of where the project is, and where we're headed.
## Filing issues
Please check the existing issues and [FAQ](docs/FAQ.md) to see if your feedback has already been reported.
General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) or the [Gophers Slack #vendor channel](https://gophers.slack.com/messages/C0M5YP9LN/) instead of the issue tracker.
The gophers there will answer or ask you to file an issue if you've tripped over a bug.
For an invite to the Slack channel, [fill out this form](https://invite.slack.golangbridge.org/).
When [filing an issue](https://github.com/golang/dep/issues/new), make sure to answer these five questions:
1. What version of Go (`go version`) and `dep` (`git describe --tags`) are you using??
3. What `dep` command did you run?
4. What did you expect to see?
5. What did you see instead?
## Contributing code
Let us know if you are interested in working on an issue by leaving a comment
on the issue in GitHub. This helps avoid multiple people unknowingly
working on the same issue.
Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
before sending patches.
The
[help wanted](https://github.com/golang/dep/issues?q=is%3Aissue+is%3Aopen+label%3A%22help%20wanted%22)
label highlights issues that are well-suited for folks to jump in on. The
[good first issue](https://github.com/golang/dep/issues?q=is%3Aissue+is%3Aopen+label%3A%22good%20first%20issue%22)
label further identifies issues that are particularly well-sized for newcomers.
Unless otherwise noted, the `dep` source files are distributed under
the BSD-style license found in the LICENSE file.
All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult [GitHub Help] for more
information on using pull requests.
We check `dep`'s own `vendor` directory into git. For any PR to `dep` where you're
updating `Gopkg.toml`, make sure to run `dep ensure` and commit all changes to `vendor`.
[GitHub Help]: https://help.github.com/articles/about-pull-requests/
## Contributing to the Documentation
All the docs reside in the [`docs/`](docs/) directory. For any relatively small
change - like fixing a typo or rewording something - the easiest way to
contribute is directly on Github, using their web code editor.
For relatively big change - changes in the design, links or adding a new page -
the docs site can be run locally. We use [docusaurus](http://docusaurus.io/) to
generate the docs site. [`website/`](website/) directory contains all the
docusaurus configurations. To run the site locally, `cd` into `website/`
directory and run `npm i --only=dev` to install all the dev dependencies. Then
run `npm start` to start serving the site. By default, the site would be served
at http://localhost:3000.
## Contributor License Agreement
Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution,
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.
## Maintainer's Guide
`dep` has subsystem maintainers; this guide is intended for them in performing their work as a maintainer.
### General guidelines
* _Be kind, respectful, and inclusive_. Really live that [CoC](https://github.com/golang/dep/blob/master/CODE_OF_CONDUCT.md). We've developed a reputation as one of the most welcoming and supportive project environments in the Go community, and we want to keep that up!
* The lines of responsibility between maintainership areas can be fuzzy. Get to know your fellow maintainers - it's important to work _with_ them when an issue falls in this grey area.
* Remember, the long-term goal of `dep` is to disappear into the `go` toolchain. That's going to be a challenging process, no matter what. Minimizing that eventual difficulty should be a guiding light for all your decisions today.
* Try to match the toolchain's assumptions as closely as possible ([example](https://github.com/golang/dep/issues/564#issuecomment-300994599)), and avoid introducing new rules the toolchain would later have to incorporate.
* Every new flag or option in the metadata files is more exposed surface area that demands conversion later. Only add these with a clear design plan.
* `dep` is experimental, but increasingly only on a larger scale. Experiments need clear hypotheses and parameters for testing - nothing off-the-cuff.
* Being a maintainer doesn't mean you're always right. Admitting when you've made a mistake keeps the code flowing, the environment health, and the respect level up.
* It's fine if you need to step back from maintainership responsibilities - just, please, don't fade away! Let other maintainers know what's going on.
### Issue management
* We use [Zenhub](https://www.zenhub.com) to manage the queue, in addition to what we do with labels.
* You will need to install [ZenHub extension](https://www.zenhub.com/extension) to your browser to show the board.
* Pipelines, and [the board](https://github.com/golang/dep#boards) are one thing we try to utilize:
* **New Issues Pipeline**: When someone creates a new issue, it goes here first. Keep an eye out for issues that fall into your area. Add labels to them, and if it's something we should do, put it in the `Backlog` pipeline. If you aren't sure, throw it in the `Icebox`. It helps to sort this pipeline by date.
* **Icebox Pipeline**: Issues that we aren't immediately closing but aren't really ready to be prioritized and started on. It's not a wontfix bucket, but a "not sure if we should/can fix right now" bucket.
* **Backlog Pipeline**: Issues that we know we want to tackle. You can drag/drop up and down to prioritize issues.
* Marking dependencies/blockers is also quite useful where appropriate; please do that.
* We use epics and milestones in roughly the same way (because OSS projects don't have real sprints). Epics should be duplicated as milestones; if there's a main epic issue, it should contain a checklist of the relevant issues to complete it.
* The `area:` labels correspond to maintainership areas. Apply yours to any issues or PRs that fall under your purview. It's to be expected that multiple `area:` labels may be applied to a single issue.
* The [`help wanted`](https://github.com/golang/dep/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) and [`good first issue`](https://github.com/golang/dep/labels/good%20first%20issue) labels are two of our most important tools for making the project accessible to newcomers - a key goal for our community. Here's how to use them well.
* `good-first-pr` should be applied when there's a very straightforward, self-contained task that is very unlikely to have any hidden complexity. The real purpose of these is to provide a "chink in the armor", providing newcomers a lens through which to start understanding the project.
* `help-wanted` should be applied to issues where there's a clear, stated goal, there is at most one significant question that needs answering, and it looks like the implementation won't be inordinately difficult, or disruptive to other parts of the system.
* `help-wanted` should also be applied to all `good-first-pr` issues - it's duplicative, but not doing so seems unfriendly.
### Pull Requests
* Try to make, and encourage, smaller pull requests.
* [No is temporary. Yes is forever.](https://blog.jessfraz.com/post/the-art-of-closing/)
* Long-running feature branches should generally be avoided. Discuss it with other maintainers first.
* Unless it's trivial, don't merge your own PRs - ask another maintainer.
* Commit messages should follow [Tim Pope's rules](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
* Checklist for merging PRs:
* Does the PR pass [the code review comments](https://github.com/golang/go/wiki/CodeReviewComments)? (internalize these rules!)
* Are there tests to cover new or changed behavior? Prefer reliable tests > no tests > flaky tests.
* Does the first post in the PR contain "Fixes #..." text for any issues it resolves?
* Are any necessary follow-up issues _already_ posted, prior to merging?
* Does this change entail the updating of any docs?
* For docs kept in the repo, e.g. FAQ.md, docs changes _must_ be submitted as part of the same PR.
================================================
FILE: CONTRIBUTORS
================================================
# This source code was written by the Go contributors.
# The master list of contributors is in the main Go distribution,
# visible at http://tip.golang.org/CONTRIBUTORS.
================================================
FILE: Gopkg.toml
================================================
[[constraint]]
name = "github.com/Masterminds/semver"
branch = "2.x"
[[constraint]]
name = "github.com/Masterminds/vcs"
version = "1.11.0"
[[constraint]]
name = "github.com/pelletier/go-toml"
version = "1.2.0"
[[constraint]]
name = "github.com/pkg/errors"
version = "0.8.0"
[[constraint]]
name = "github.com/boltdb/bolt"
version = "1.0.0"
[[constraint]]
name = "github.com/jmank88/nuts"
version = "0.3.0"
[prune]
non-go = true
go-tests = true
unused-packages = true
================================================
FILE: LICENSE
================================================
Copyright (c) 2014 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: MAINTAINERS.md
================================================
General maintainers:
sam boyer (@sdboyer)
* dep
* `init` command: Carolyn Van Slyck (@carolynvs)
* `ensure` command: Ibrahim AshShohail (@ibrasho)
* `status` command: Sunny (@darkowlzz)
* testing harness: (vacant)
* gps
* solver: (vacant)
* source manager: (@jmank88)
* root deduction: (vacant)
* source/vcs interaction: (@jmank88)
* caching: Jordan Krage (@jmank88)
* pkgtree: (vacant)
* versions and constraints: (@jmank88)
================================================
FILE: Makefile
================================================
SHELL := /bin/bash
PLATFORM := $(shell go env GOOS)
ARCH := $(shell go env GOARCH)
GOPATH := $(shell go env GOPATH)
GOBIN := $(GOPATH)/bin
default: build validate test
get-deps:
go get -u golang.org/x/lint/golint honnef.co/go/tools/cmd/staticcheck
build:
go fmt ./...
DEP_BUILD_PLATFORMS=$(PLATFORM) DEP_BUILD_ARCHS=$(ARCH) ./hack/build-all.bash
cp ./release/dep-$(PLATFORM)-$(ARCH) dep
licenseok:
go build -o licenseok ./hack/licenseok/main.go
validate: build licenseok
./dep check
./hack/lint.bash
./hack/validate-licence.bash
test: build
./hack/test.bash
install: build
cp ./dep $(GOBIN)
docusaurus:
docker run --rm -it -v `pwd`:/dep -p 3000:3000 \
-w /dep/website node \
bash -c "npm i --only=dev && npm start"
.PHONY: build validate test install docusaurus
================================================
FILE: PATENTS
================================================
Additional IP Rights Grant (Patents)
"This implementation" means the copyrightable works distributed by
Google as part of the Go project.
Google hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import,
transfer and otherwise run, modify and propagate the contents of this
implementation of Go, where such license applies only to those patent
claims, both currently owned or controlled by Google and acquired in
the future, licensable by Google that are necessarily infringed by this
implementation of Go. This grant does not include claims that would be
infringed only as a consequence of further modification of this
implementation. If you or your agent or exclusive licensee institute or
order or agree to the institution of patent litigation against any
entity (including a cross-claim or counterclaim in a lawsuit) alleging
that this implementation of Go or any code incorporated within this
implementation of Go constitutes direct or contributory patent
infringement, or inducement of patent infringement, then any patent
rights granted to you under this License for this implementation of Go
shall terminate as of the date such litigation is filed.
================================================
FILE: README.md
================================================
<p align="center"><img src="docs/assets/DigbyShadows.png" width="360"></p>
<p align="center">
<a href="https://travis-ci.org/golang/dep"><img src="https://travis-ci.org/golang/dep.svg?branch=master" alt="Build Status"></img></a>
<a href="https://ci.appveyor.com/project/golang/dep"><img src="https://ci.appveyor.com/api/projects/status/github/golang/dep?svg=true&branch=master&passingText=Windows%20-%20OK&failingText=Windows%20-%20failed&pendingText=Windows%20-%20pending" alt="Windows Build Status"></a>
<a href="https://goreportcard.com/report/github.com/golang/dep"><img src="https://goreportcard.com/badge/github.com/golang/dep" /></a>
</p>
## Dep
`dep` is a dependency management tool for Go. It requires Go 1.9 or newer to compile.
**NOTE:** Dep was an official experiment to implement a package manager for Go.
As of 2020, Dep is deprecated and archived in favor of Go modules, which have
had official support since Go 1.11. For more details, see https://golang.org/ref/mod.
For guides and reference materials about `dep`, see [the documentation](https://golang.github.io/dep).
## Installation
You should use an officially released version. Release binaries are available on
the [releases](https://github.com/golang/dep/releases) page.
On MacOS you can install or upgrade to the latest released version with Homebrew:
```sh
$ brew install dep
$ brew upgrade dep
```
On Debian platforms you can install or upgrade to the latest version with apt-get:
```sh
$ sudo apt-get install go-dep
```
On Windows, you can download a tarball from
[go.equinox.io](https://go.equinox.io/github.com/golang/dep/cmd/dep).
On other platforms you can use the `install.sh` script:
```sh
$ curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
```
It will install into your `$GOPATH/bin` directory by default or any other directory you specify using the `INSTALL_DIRECTORY` environment variable.
If your platform is not supported, you'll need to build it manually or let the team know and we'll consider adding your platform
to the release builds.
If you're interested in getting the source code, or hacking on `dep`, you can
install via `go get`:
```sh
go get -u github.com/golang/dep/cmd/dep
```
================================================
FILE: analyzer.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package dep
import (
"os"
"path/filepath"
"github.com/golang/dep/gps"
"github.com/golang/dep/internal/fs"
)
// Analyzer implements gps.ProjectAnalyzer.
type Analyzer struct{}
// HasDepMetadata determines if a dep manifest exists at the specified path.
func (a Analyzer) HasDepMetadata(path string) bool {
mf := filepath.Join(path, ManifestName)
fileOK, err := fs.IsRegular(mf)
return err == nil && fileOK
}
// DeriveManifestAndLock reads and returns the manifest at path/ManifestName or nil if one is not found.
// The Lock is always nil for now.
func (a Analyzer) DeriveManifestAndLock(path string, n gps.ProjectRoot) (gps.Manifest, gps.Lock, error) {
if !a.HasDepMetadata(path) {
return nil, nil, nil
}
f, err := os.Open(filepath.Join(path, ManifestName))
if err != nil {
return nil, nil, err
}
defer f.Close()
// Ignore warnings irrelevant to user.
m, _, err := readManifest(f)
if err != nil {
return nil, nil, err
}
return m, nil, nil
}
// Info returns Analyzer's name and version info.
func (a Analyzer) Info() gps.ProjectAnalyzerInfo {
return gps.ProjectAnalyzerInfo{
Name: "dep",
Version: 1,
}
}
================================================
FILE: analyzer_notwindows_test.go
================================================
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !windows
package dep
import (
"io"
"os"
)
func makeUnreadable(path string) (io.Closer, error) {
err := os.Chmod(path, 0222)
if err != nil {
return nil, err
}
return closer{}, nil
}
type closer struct{}
func (closer) Close() error { return nil }
================================================
FILE: analyzer_test.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package dep
import (
"path/filepath"
"testing"
"github.com/golang/dep/internal/test"
)
func TestAnalyzerDeriveManifestAndLock(t *testing.T) {
h := test.NewHelper(t)
defer h.Cleanup()
h.TempDir("dep")
golden := filepath.Join("analyzer", ManifestName)
want := h.GetTestFileString(golden)
h.TempCopy(filepath.Join("dep", ManifestName), golden)
a := Analyzer{}
m, l, err := a.DeriveManifestAndLock(h.Path("dep"), "my/fake/project")
if err != nil {
t.Fatal(err)
}
got, err := m.(*Manifest).MarshalTOML()
if err != nil {
t.Fatal(err)
}
if want != string(got) {
if *test.UpdateGolden {
if err := h.WriteTestFile(golden, string(got)); err != nil {
t.Fatal(err)
}
} else {
t.Fatalf("(WNT):\n%s\n(GOT):\n%s", want, string(got))
}
}
if l != nil {
t.Fatalf("expected lock to be nil, got: %#v", l)
}
}
func TestAnalyzerDeriveManifestAndLockDoesNotExist(t *testing.T) {
h := test.NewHelper(t)
defer h.Cleanup()
h.TempDir("dep")
a := Analyzer{}
m, l, err := a.DeriveManifestAndLock(h.Path("dep"), "my/fake/project")
if m != nil || l != nil || err != nil {
t.Fatalf("expected manifest & lock & err to be nil: m -> %#v l -> %#v err-> %#v", m, l, err)
}
}
func TestAnalyzerDeriveManifestAndLockCannotOpen(t *testing.T) {
h := test.NewHelper(t)
defer h.Cleanup()
h.TempDir("dep")
// Simulate an inaccessible manifest file.
h.TempFile(filepath.Join("dep", ManifestName), "")
closer, err := makeUnreadable(filepath.Join(h.Path("dep"), ManifestName))
if err != nil {
t.Fatal(err)
}
defer closer.Close()
a := Analyzer{}
// Verify that the solver rejects the manifest, rather than treating it as
// offering no constraints.
m, l, err := a.DeriveManifestAndLock(h.Path("dep"), "my/fake/project")
if m != nil || l != nil || err == nil {
t.Fatalf("expected manifest & lock to be nil, err to be not nil: m -> %#v l -> %#v err -> %#v", m, l, err)
}
}
func TestAnalyzerDeriveManifestAndLockInvalidManifest(t *testing.T) {
h := test.NewHelper(t)
defer h.Cleanup()
h.TempDir("dep")
// Create a manifest with invalid contents
h.TempFile(filepath.Join("dep", ManifestName), "invalid manifest")
a := Analyzer{}
m, l, err := a.DeriveManifestAndLock(h.Path("dep"), "my/fake/project")
if m != nil || l != nil || err == nil {
t.Fatalf("expected manifest & lock & err to be nil: m -> %#v l -> %#v err-> %#v", m, l, err)
}
}
func TestAnalyzerInfo(t *testing.T) {
a := Analyzer{}
info := a.Info()
if info.Name != "dep" || info.Version != 1 {
t.Fatalf("expected name to be 'dep' and version to be 1: name -> %q vers -> %d", info.Name, info.Version)
}
}
================================================
FILE: analyzer_windows_test.go
================================================
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package dep
import (
"io"
"os"
"syscall"
)
// makeUnreadable opens the file at path in exclusive mode. A file opened in
// exclusive mode cannot be opened again until the exclusive mode file handle
// is closed.
func makeUnreadable(path string) (io.Closer, error) {
if len(path) == 0 {
return nil, syscall.ERROR_FILE_NOT_FOUND
}
pathp, err := syscall.UTF16PtrFromString(path)
if err != nil {
return nil, err
}
access := uint32(syscall.GENERIC_READ | syscall.GENERIC_WRITE)
sharemode := uint32(0) // no sharing == exclusive mode
sa := (*syscall.SecurityAttributes)(nil)
createmode := uint32(syscall.OPEN_EXISTING)
h, err := syscall.CreateFile(pathp, access, sharemode, sa, createmode, syscall.FILE_ATTRIBUTE_NORMAL, 0)
if err != nil {
return nil, err
}
return os.NewFile(uintptr(h), path), nil
}
================================================
FILE: appveyor.yml
================================================
version: "{build}"
# Source Config
clone_folder: c:\gopath\src\github.com\golang\dep
# Build host
environment:
GOPATH: c:\gopath
DEPTESTBYPASS501: 1
GOVERSION: 1.9
init:
- git config --global core.autocrlf input
# Build
install:
# Install the specific Go version.
- rmdir c:\go /s /q
- appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.msi
- msiexec /i go%GOVERSION%.windows-amd64.msi /q
- choco install bzr
- set Path=c:\go\bin;c:\gopath\bin;C:\Program Files (x86)\Bazaar\;C:\Program Files\Mercurial\%Path%
- go version
- go env
build: false
deploy: false
test_script:
- go build github.com/golang/dep/cmd/dep
- for /f "" %%G in ('go list github.com/golang/dep/...') do ( go test %%G & IF ERRORLEVEL == 1 EXIT 1)
================================================
FILE: cmd/dep/check.go
================================================
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"sort"
"strings"
"github.com/golang/dep"
"github.com/golang/dep/gps"
"github.com/golang/dep/gps/verify"
"github.com/pkg/errors"
)
const checkShortHelp = `Check if imports, Gopkg.toml, and Gopkg.lock are in sync`
const checkLongHelp = `
Check determines if your project is in a good state. If problems are found, it
prints a description of each issue, then exits 1. Passing -q suppresses output.
Flags control which specific checks will be run. By default, dep check verifies
that Gopkg.lock is in sync with Gopkg.toml and the imports in your project's .go
files, and that the vendor directory is in sync with Gopkg.lock. These checks
can be disabled with -skip-lock and -skip-vendor, respectively.
(See https://golang.github.io/dep/docs/ensure-mechanics.html#staying-in-sync for
more information on what it means to be "in sync.")
If your workflow necessitates that you modify the contents of vendor, you can
force check to ignore hash mismatches on a per-project basis by naming
project roots in Gopkg.toml's "noverify" list.
`
type checkCommand struct {
quiet bool
skiplock, skipvendor bool
}
func (cmd *checkCommand) Name() string { return "check" }
func (cmd *checkCommand) Args() string {
return "[-q] [-skip-lock] [-skip-vendor]"
}
func (cmd *checkCommand) ShortHelp() string { return checkShortHelp }
func (cmd *checkCommand) LongHelp() string { return checkLongHelp }
func (cmd *checkCommand) Hidden() bool { return false }
func (cmd *checkCommand) Register(fs *flag.FlagSet) {
fs.BoolVar(&cmd.skiplock, "skip-lock", false, "Skip checking that imports and Gopkg.toml are in sync with Gopkg.lock")
fs.BoolVar(&cmd.skipvendor, "skip-vendor", false, "Skip checking that vendor is in sync with Gopkg.lock")
fs.BoolVar(&cmd.quiet, "q", false, "Suppress non-error output")
}
func (cmd *checkCommand) Run(ctx *dep.Ctx, args []string) error {
logger := ctx.Out
if cmd.quiet {
logger = log.New(ioutil.Discard, "", 0)
}
p, err := ctx.LoadProject()
if err != nil {
return err
}
sm, err := ctx.SourceManager()
if err != nil {
return err
}
sm.UseDefaultSignalHandling()
defer sm.Release()
var fail bool
if !cmd.skiplock {
if p.Lock == nil {
return errors.New("Gopkg.lock does not exist, cannot check it against imports and Gopkg.toml")
}
lsat := verify.LockSatisfiesInputs(p.Lock, p.Manifest, p.RootPackageTree)
delta := verify.DiffLocks(p.Lock, p.ChangedLock)
sat, changed := lsat.Satisfied(), delta.Changed(verify.PruneOptsChanged|verify.HashVersionChanged)
if changed || !sat {
fail = true
logger.Println("# Gopkg.lock is out of sync:")
if !sat {
logger.Printf("%s\n", sprintLockUnsat(lsat))
}
if changed {
// Sort, for deterministic output.
var ordered []string
for pr := range delta.ProjectDeltas {
ordered = append(ordered, string(pr))
}
sort.Strings(ordered)
for _, pr := range ordered {
lpd := delta.ProjectDeltas[gps.ProjectRoot(pr)]
// Only two possible changes right now are prune opts
// changing or a missing hash digest (for old Gopkg.lock
// files)
if lpd.PruneOptsChanged() {
// Override what's on the lockdiff with the extra info we have;
// this lets us excise PruneNestedVendorDirs and get the real
// value from the input param in place.
old := lpd.PruneOptsBefore & ^gps.PruneNestedVendorDirs
new := lpd.PruneOptsAfter & ^gps.PruneNestedVendorDirs
logger.Printf("%s: prune options changed (%s -> %s)\n", pr, old, new)
}
if lpd.HashVersionWasZero() {
logger.Printf("%s: no hash digest in lock\n", pr)
}
}
}
}
}
if !cmd.skipvendor {
if p.Lock == nil {
return errors.New("Gopkg.lock does not exist, cannot check vendor against it")
}
statuses, err := p.VerifyVendor()
if err != nil {
return errors.Wrap(err, "error while verifying vendor")
}
if fail {
logger.Println()
}
noverify := make(map[string]bool)
for _, skip := range p.Manifest.NoVerify {
noverify[skip] = true
}
var vendorfail, hasnoverify bool
// One full pass through, to see if we need to print the header, and to
// create an array of names to sort for deterministic output.
var ordered []string
for path, status := range statuses {
ordered = append(ordered, path)
switch status {
case verify.DigestMismatchInLock, verify.HashVersionMismatch, verify.EmptyDigestInLock, verify.NotInLock:
if noverify[path] {
hasnoverify = true
continue
}
fallthrough
case verify.NotInTree:
// NoVerify cannot be used to make dep check ignore the absence
// of a project entirely.
if noverify[path] {
delete(noverify, path)
}
fail = true
if !vendorfail {
vendorfail = true
}
}
}
sort.Strings(ordered)
var vfbuf, novbuf bytes.Buffer
var bufptr *bytes.Buffer
fmt.Fprintf(&vfbuf, "# vendor is out of sync:\n")
fmt.Fprintf(&novbuf, "# out of sync, but ignored, due to noverify in Gopkg.toml:\n")
for _, pr := range ordered {
if noverify[pr] {
bufptr = &novbuf
} else {
bufptr = &vfbuf
}
status := statuses[pr]
switch status {
case verify.NotInTree:
fmt.Fprintf(bufptr, "%s: missing from vendor\n", pr)
case verify.NotInLock:
fi, err := os.Stat(filepath.Join(p.AbsRoot, "vendor", pr))
if err != nil {
return errors.Wrap(err, "could not stat file that VerifyVendor claimed existed")
}
if fi.IsDir() {
fmt.Fprintf(bufptr, "%s: unused project\n", pr)
} else {
fmt.Fprintf(bufptr, "%s: orphaned file\n", pr)
}
case verify.DigestMismatchInLock:
fmt.Fprintf(bufptr, "%s: hash of vendored tree not equal to digest in Gopkg.lock\n", pr)
case verify.EmptyDigestInLock:
fmt.Fprintf(bufptr, "%s: no digest in Gopkg.lock to compare against hash of vendored tree\n", pr)
case verify.HashVersionMismatch:
// This will double-print if the hash version is zero, but
// that's a rare case that really only occurs before the first
// run with a version of dep >=0.5.0, so it's fine.
fmt.Fprintf(bufptr, "%s: hash algorithm mismatch, want version %v\n", pr, verify.HashVersion)
}
}
if vendorfail {
logger.Print(vfbuf.String())
if hasnoverify {
logger.Println()
}
}
if hasnoverify {
logger.Print(novbuf.String())
}
}
if fail {
return silentfail{}
}
return nil
}
func sprintLockUnsat(lsat verify.LockSatisfaction) string {
var buf bytes.Buffer
sort.Strings(lsat.MissingImports)
for _, missing := range lsat.MissingImports {
fmt.Fprintf(&buf, "%s: imported or required, but missing from Gopkg.lock's input-imports\n", missing)
}
sort.Strings(lsat.ExcessImports)
for _, excess := range lsat.ExcessImports {
fmt.Fprintf(&buf, "%s: in Gopkg.lock's input-imports, but neither imported nor required\n", excess)
}
var ordered []string
for pr := range lsat.UnmetOverrides {
ordered = append(ordered, string(pr))
}
sort.Strings(ordered)
for _, pr := range ordered {
unmatched := lsat.UnmetOverrides[gps.ProjectRoot(pr)]
fmt.Fprintf(&buf, "%s@%s: not allowed by override %s\n", pr, unmatched.V, unmatched.C)
}
ordered = ordered[:0]
for pr := range lsat.UnmetConstraints {
ordered = append(ordered, string(pr))
}
sort.Strings(ordered)
for _, pr := range ordered {
unmatched := lsat.UnmetConstraints[gps.ProjectRoot(pr)]
fmt.Fprintf(&buf, "%s@%s: not allowed by constraint %s\n", pr, unmatched.V, unmatched.C)
}
return strings.TrimSpace(buf.String())
}
================================================
FILE: cmd/dep/dep_test.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"os"
"os/exec"
"path/filepath"
"testing"
"github.com/golang/dep/internal/test"
)
// The TestMain function creates a dep command for testing purposes and
// deletes it after the tests have been run.
// Most of this is taken from https://github.com/golang/go/blob/master/src/cmd/go/go_test.go and reused here.
func TestMain(m *testing.M) {
args := []string{"build", "-o", "testdep" + test.ExeSuffix}
out, err := exec.Command("go", args...).CombinedOutput()
if err != nil {
fmt.Fprintf(os.Stderr, "building testdep failed: %v\n%s", err, out)
os.Exit(2)
}
// Don't let these environment variables confuse the test.
os.Unsetenv("GOPATH")
os.Unsetenv("GIT_ALLOW_PROTOCOL")
if home, ccacheDir := os.Getenv("HOME"), os.Getenv("CCACHE_DIR"); home != "" && ccacheDir == "" {
// On some systems the default C compiler is ccache.
// Setting HOME to a non-existent directory will break
// those systems. Set CCACHE_DIR to cope. Issue 17668.
os.Setenv("CCACHE_DIR", filepath.Join(home, ".ccache"))
}
os.Setenv("HOME", "/test-dep-home-does-not-exist")
r := m.Run()
os.Remove("testdep" + test.ExeSuffix)
os.Exit(r)
}
================================================
FILE: cmd/dep/doc.go
================================================
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// DO NOT EDIT THIS FILE. GENERATED BY mkdoc.sh.
// Edit the documentation in other files and rerun mkdoc.sh to generate this one.
// Dep is a tool for managing dependencies for Go projects
//
// Usage: "dep [command]"
//
// Commands:
//
// init Initialize a new project with manifest and lock files
// status Report the status of the project's dependencies
// ensure Ensure a dependency is safely vendored in the project
// prune Prune the vendor tree of unused packages
// version Show the dep version information
//
// Examples:
// dep init set up a new project
// dep ensure install the project's dependencies
// dep ensure -update update the locked versions of all dependencies
// dep ensure -add github.com/pkg/errors add a dependency to the project
//
// Use "dep help [command]" for more information about a command.
//
// Initialize a new project with manifest and lock files
//
// Usage:
//
// init [root]
//
// Initialize the project at filepath root by parsing its dependencies, writing
// manifest and lock files, and vendoring the dependencies. If root isn't
// specified, use the current directory.
//
// When configuration for another dependency management tool is detected, it is
// imported into the initial manifest and lock. Use the -skip-tools flag to
// disable this behavior. The following external tools are supported:
// glide, godep, vndr, govend, gb, gvt, glock.
//
// Any dependencies that are not constrained by external configuration use the
// GOPATH analysis below.
//
// By default, the dependencies are resolved over the network. A version will be
// selected from the versions available from the upstream source per the following
// algorithm:
//
// - Tags conforming to semver (sorted by semver rules)
// - Default branch(es) (sorted lexicographically)
// - Non-semver tags (sorted lexicographically)
//
// An alternate mode can be activated by passing -gopath. In this mode, the version
// of each dependency will reflect the current state of the GOPATH. If a dependency
// doesn't exist in the GOPATH, a version will be selected based on the above
// network version selection algorithm.
//
// A Gopkg.toml file will be written with inferred version constraints for all
// direct dependencies. Gopkg.lock will be written with precise versions, and
// vendor/ will be populated with the precise versions written to Gopkg.lock.
//
//
// Report the status of the project's dependencies
//
// Usage:
//
// status [package...]
//
// With no arguments, print the status of each dependency of the project.
//
// PROJECT Import path
// CONSTRAINT Version constraint, from the manifest
// VERSION Version chosen, from the lock
// REVISION VCS revision of the chosen version
// LATEST Latest VCS revision available
// PKGS USED Number of packages from this project that are actually used
//
// With one or more explicitly specified packages, or with the -detailed flag,
// print an extended status output for each dependency of the project.
//
// TODO Another column description
// FOOBAR Another column description
//
// Status returns exit code zero if all dependencies are in a "good state".
//
//
// Ensure a dependency is safely vendored in the project
//
// Usage:
//
// ensure [-update | -add] [-no-vendor | -vendor-only] [-dry-run] [<spec>...]
//
// Project spec:
//
// <import path>[:alt source URL][@<constraint>]
//
//
// Ensure gets a project into a complete, reproducible, and likely compilable state:
//
// * All non-stdlib imports are fulfilled
// * All rules in Gopkg.toml are respected
// * Gopkg.lock records precise versions for all dependencies
// * vendor/ is populated according to Gopkg.lock
//
// Ensure has fast techniques to determine that some of these steps may be
// unnecessary. If that determination is made, ensure may skip some steps. Flags
// may be passed to bypass these checks; -vendor-only will allow an out-of-date
// Gopkg.lock to populate vendor/, and -no-vendor will update Gopkg.lock (if
// needed), but never touch vendor/.
//
// The effect of passing project spec arguments varies slightly depending on the
// combination of flags that are passed.
//
//
// Examples:
//
// dep ensure Populate vendor from existing Gopkg.toml and Gopkg.lock
// dep ensure -add github.com/pkg/foo Introduce a named dependency at its newest version
// dep ensure -add github.com/pkg/foo@^1.0.1 Introduce a named dependency with a particular constraint
//
// For more detailed usage examples, see dep ensure -examples.
//
//
// Prune the vendor tree of unused packages
//
// Usage:
//
// prune
//
// Prune is used to remove unused packages from your vendor tree.
//
// STABILITY NOTICE: this command creates problems for vendor/ verification. As
// such, it may be removed and/or moved out into a separate project later on.
//
//
// Show the dep version information
//
// Usage:
//
// version
//
package main
================================================
FILE: cmd/dep/ensure.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"context"
"flag"
"fmt"
"go/build"
"log"
"os"
"path/filepath"
"sort"
"strings"
"sync"
"github.com/golang/dep"
"github.com/golang/dep/gps"
"github.com/golang/dep/gps/paths"
"github.com/golang/dep/gps/pkgtree"
"github.com/golang/dep/gps/verify"
"github.com/pkg/errors"
)
const ensureShortHelp = `Ensure a dependency is safely vendored in the project`
const ensureLongHelp = `
Project spec:
<import path>[:alt source URL][@<constraint>]
Ensure gets a project into a complete, reproducible, and likely compilable state:
* All imports are fulfilled
* All rules in Gopkg.toml are respected
* Gopkg.lock records immutable versions for all dependencies
* vendor/ is populated according to Gopkg.lock
Ensure has fast techniques to determine that some of these steps may be
unnecessary. If that determination is made, ensure may skip some steps. Flags
may be passed to bypass these checks; -vendor-only will allow an out-of-date
Gopkg.lock to populate vendor/, and -no-vendor will update Gopkg.lock (if
needed), but never touch vendor/.
The effect of passing project spec arguments varies slightly depending on the
combination of flags that are passed.
Examples:
dep ensure Populate vendor from existing Gopkg.toml and Gopkg.lock
dep ensure -add github.com/pkg/foo Introduce a named dependency at its newest version
dep ensure -add github.com/pkg/foo@^1.0.1 Introduce a named dependency with a particular constraint
For more detailed usage examples, see dep ensure -examples.
`
const ensureExamples = `
dep ensure
Solve the project's dependency graph, and place all dependencies in the
vendor folder. If a dependency is in the lock file, use the version
specified there. Otherwise, use the most recent version that can satisfy the
constraints in the manifest file.
dep ensure -vendor-only
Write vendor/ from an existing Gopkg.lock file, without first verifying that
the lock is in sync with imports and Gopkg.toml. (This may be useful for
e.g. strategically layering a Docker images)
dep ensure -add github.com/pkg/foo github.com/pkg/foo/bar
Introduce one or more dependencies, at their newest version, ensuring that
specific packages are present in Gopkg.lock and vendor/. Also, append a
corresponding constraint to Gopkg.toml.
Note: packages introduced in this way will disappear on the next "dep
ensure" if an import statement is not added first.
dep ensure -add github.com/pkg/foo/subpkg@1.0.0 bitbucket.org/pkg/bar/baz@master
Append version constraints to Gopkg.toml for one or more packages, if no
such rules already exist.
If the named packages are not already imported, also ensure they are present
in Gopkg.lock and vendor/. As in the preceding example, packages introduced
in this way will disappear on the next "dep ensure" if an import statement
is not added first.
dep ensure -add github.com/pkg/foo:git.internal.com/alt/foo
Specify an alternate location to treat as the upstream source for a dependency.
dep ensure -update github.com/pkg/foo github.com/pkg/bar
Update a list of dependencies to the latest versions allowed by Gopkg.toml,
ignoring any versions recorded in Gopkg.lock. Write the results to
Gopkg.lock and vendor/.
dep ensure -update
Update all dependencies to the latest versions allowed by Gopkg.toml,
ignoring any versions recorded in Gopkg.lock. Update the lock file with any
changes. (NOTE: Not recommended. Updating one/some dependencies at a time is
preferred.)
dep ensure -update -no-vendor
As above, but only modify Gopkg.lock; leave vendor/ unchanged.
dep ensure -no-vendor -dry-run
This fails with a non zero exit code if Gopkg.lock is not up to date with
the Gopkg.toml or the project imports. It can be useful to run this during
CI to check if Gopkg.lock is up to date.
`
var (
errUpdateArgsValidation = errors.New("update arguments validation failed")
errAddDepsFailed = errors.New("adding dependencies failed")
)
func (cmd *ensureCommand) Name() string { return "ensure" }
func (cmd *ensureCommand) Args() string {
return "[-update | -add] [-no-vendor | -vendor-only] [-dry-run] [-v] [<spec>...]"
}
func (cmd *ensureCommand) ShortHelp() string { return ensureShortHelp }
func (cmd *ensureCommand) LongHelp() string { return ensureLongHelp }
func (cmd *ensureCommand) Hidden() bool { return false }
func (cmd *ensureCommand) Register(fs *flag.FlagSet) {
fs.BoolVar(&cmd.examples, "examples", false, "print detailed usage examples")
fs.BoolVar(&cmd.update, "update", false, "update the named dependencies (or all, if none are named) in Gopkg.lock to the latest allowed by Gopkg.toml")
fs.BoolVar(&cmd.add, "add", false, "add new dependencies, or populate Gopkg.toml with constraints for existing dependencies")
fs.BoolVar(&cmd.vendorOnly, "vendor-only", false, "populate vendor/ from Gopkg.lock without updating it first")
fs.BoolVar(&cmd.noVendor, "no-vendor", false, "update Gopkg.lock (if needed), but do not update vendor/")
fs.BoolVar(&cmd.dryRun, "dry-run", false, "only report the changes that would be made")
}
type ensureCommand struct {
examples bool
update bool
add bool
noVendor bool
vendorOnly bool
dryRun bool
}
func (cmd *ensureCommand) Run(ctx *dep.Ctx, args []string) error {
if cmd.examples {
ctx.Err.Println(strings.TrimSpace(ensureExamples))
return nil
}
if err := cmd.validateFlags(); err != nil {
return err
}
p, err := ctx.LoadProject()
if err != nil {
return err
}
sm, err := ctx.SourceManager()
if err != nil {
return err
}
sm.UseDefaultSignalHandling()
defer sm.Release()
if err := dep.ValidateProjectRoots(ctx, p.Manifest, sm); err != nil {
return err
}
params := p.MakeParams()
if ctx.Verbose {
params.TraceLogger = ctx.Err
}
if cmd.vendorOnly {
return cmd.runVendorOnly(ctx, args, p, sm, params)
}
if fatal, err := checkErrors(params.RootPackageTree.Packages, p.Manifest.IgnoredPackages()); err != nil {
if fatal {
return err
} else if ctx.Verbose {
ctx.Out.Println(err)
}
}
if ineffs := p.FindIneffectualConstraints(sm); len(ineffs) > 0 {
ctx.Err.Printf("Warning: the following project(s) have [[constraint]] stanzas in %s:\n\n", dep.ManifestName)
for _, ineff := range ineffs {
ctx.Err.Println(" ✗ ", ineff)
}
// TODO(sdboyer) lazy wording, it does not mention ignores at all
ctx.Err.Printf("\nHowever, these projects are not direct dependencies of the current project:\n")
ctx.Err.Printf("they are not imported in any .go files, nor are they in the 'required' list in\n")
ctx.Err.Printf("%s. Dep only applies [[constraint]] rules to direct dependencies, so\n", dep.ManifestName)
ctx.Err.Printf("these rules will have no effect.\n\n")
ctx.Err.Printf("Either import/require packages from these projects so that they become direct\n")
ctx.Err.Printf("dependencies, or convert each [[constraint]] to an [[override]] to enforce rules\n")
ctx.Err.Printf("on these projects, if they happen to be transitive dependencies.\n\n")
}
// Kick off vendor verification in the background. All of the remaining
// paths from here will need it, whether or not they end up solving.
go p.VerifyVendor()
if cmd.add {
return cmd.runAdd(ctx, args, p, sm, params)
} else if cmd.update {
return cmd.runUpdate(ctx, args, p, sm, params)
}
return cmd.runDefault(ctx, args, p, sm, params)
}
func (cmd *ensureCommand) validateFlags() error {
if cmd.add && cmd.update {
return errors.New("cannot pass both -add and -update")
}
if cmd.vendorOnly {
if cmd.update {
return errors.New("-vendor-only makes -update a no-op; cannot pass them together")
}
if cmd.add {
return errors.New("-vendor-only makes -add a no-op; cannot pass them together")
}
if cmd.noVendor {
// TODO(sdboyer) can't think of anything not snarky right now
return errors.New("really?")
}
}
return nil
}
func (cmd *ensureCommand) vendorBehavior() dep.VendorBehavior {
if cmd.noVendor {
return dep.VendorNever
}
return dep.VendorOnChanged
}
func (cmd *ensureCommand) runDefault(ctx *dep.Ctx, args []string, p *dep.Project, sm gps.SourceManager, params gps.SolveParameters) error {
// Bare ensure doesn't take any args.
if len(args) != 0 {
return errors.New("dep ensure only takes spec arguments with -add or -update")
}
if err := ctx.ValidateParams(sm, params); err != nil {
return err
}
var solve bool
lock := p.ChangedLock
if lock != nil {
lsat := verify.LockSatisfiesInputs(p.Lock, p.Manifest, params.RootPackageTree)
if !lsat.Satisfied() {
if ctx.Verbose {
ctx.Out.Printf("# Gopkg.lock is out of sync with Gopkg.toml and project imports:\n%s\n\n", sprintLockUnsat(lsat))
}
solve = true
} else if cmd.noVendor {
// The user said not to touch vendor/, so definitely nothing to do.
return nil
}
} else {
solve = true
}
if solve {
solver, err := gps.Prepare(params, sm)
if err != nil {
return errors.Wrap(err, "prepare solver")
}
solution, err := solver.Solve(context.TODO())
if err != nil {
return handleAllTheFailuresOfTheWorld(err)
}
lock = dep.LockFromSolution(solution, p.Manifest.PruneOptions)
}
dw, err := dep.NewDeltaWriter(p, lock, cmd.vendorBehavior())
if err != nil {
return err
}
if cmd.dryRun {
return dw.PrintPreparedActions(ctx.Out, ctx.Verbose)
}
var logger *log.Logger
if ctx.Verbose {
logger = ctx.Err
}
return errors.WithMessage(dw.Write(p.AbsRoot, sm, true, logger), "grouped write of manifest, lock and vendor")
}
func (cmd *ensureCommand) runVendorOnly(ctx *dep.Ctx, args []string, p *dep.Project, sm gps.SourceManager, params gps.SolveParameters) error {
if len(args) != 0 {
return errors.Errorf("dep ensure -vendor-only only populates vendor/ from %s; it takes no spec arguments", dep.LockName)
}
if p.Lock == nil {
return errors.Errorf("no %s exists from which to populate vendor/", dep.LockName)
}
// Pass the same lock as old and new so that the writer will observe no
// difference, and write out only ncessary vendor/ changes.
dw, err := dep.NewSafeWriter(nil, p.Lock, p.Lock, dep.VendorAlways, p.Manifest.PruneOptions, nil)
//dw, err := dep.NewDeltaWriter(p.Lock, p.Lock, p.Manifest.PruneOptions, filepath.Join(p.AbsRoot, "vendor"), dep.VendorAlways)
if err != nil {
return err
}
if cmd.dryRun {
return dw.PrintPreparedActions(ctx.Out, ctx.Verbose)
}
var logger *log.Logger
if ctx.Verbose {
logger = ctx.Err
}
return errors.WithMessage(dw.Write(p.AbsRoot, sm, true, logger), "grouped write of manifest, lock and vendor")
}
func (cmd *ensureCommand) runUpdate(ctx *dep.Ctx, args []string, p *dep.Project, sm gps.SourceManager, params gps.SolveParameters) error {
if p.Lock == nil {
return errors.Errorf("-update works by updating the versions recorded in %s, but %s does not exist", dep.LockName, dep.LockName)
}
if err := ctx.ValidateParams(sm, params); err != nil {
return err
}
// When -update is specified without args, allow every dependency to change
// versions, regardless of the lock file.
if len(args) == 0 {
params.ChangeAll = true
}
if err := validateUpdateArgs(ctx, args, p, sm, ¶ms); err != nil {
return err
}
// Re-prepare a solver now that our params are complete.
solver, err := gps.Prepare(params, sm)
if err != nil {
return errors.Wrap(err, "fastpath solver prepare")
}
solution, err := solver.Solve(context.TODO())
if err != nil {
// TODO(sdboyer) special handling for warning cases as described in spec
// - e.g., named projects did not upgrade even though newer versions
// were available.
return handleAllTheFailuresOfTheWorld(err)
}
dw, err := dep.NewDeltaWriter(p, dep.LockFromSolution(solution, p.Manifest.PruneOptions), cmd.vendorBehavior())
if err != nil {
return err
}
if cmd.dryRun {
return dw.PrintPreparedActions(ctx.Out, ctx.Verbose)
}
var logger *log.Logger
if ctx.Verbose {
logger = ctx.Err
}
return errors.Wrap(dw.Write(p.AbsRoot, sm, false, logger), "grouped write of manifest, lock and vendor")
}
func (cmd *ensureCommand) runAdd(ctx *dep.Ctx, args []string, p *dep.Project, sm gps.SourceManager, params gps.SolveParameters) error {
if len(args) == 0 {
return errors.New("must specify at least one project or package to -add")
}
if err := ctx.ValidateParams(sm, params); err != nil {
return err
}
// Compile unique sets of 1) all external packages imported or required, and
// 2) the project roots under which they fall.
exmap := make(map[string]bool)
if p.ChangedLock != nil {
for _, imp := range p.ChangedLock.InputImports() {
exmap[imp] = true
}
} else {
// We'll only hit this branch if Gopkg.lock did not exist.
rm, _ := p.RootPackageTree.ToReachMap(true, true, false, p.Manifest.IgnoredPackages())
for _, imp := range rm.FlattenFn(paths.IsStandardImportPath) {
exmap[imp] = true
}
for imp := range p.Manifest.RequiredPackages() {
exmap[imp] = true
}
}
// Note: these flags are only partially used by the latter parts of the
// algorithm; rather, it relies on inference. However, they remain in their
// entirety as future needs may make further use of them, being a handy,
// terse way of expressing the original context of the arg inputs.
type addType uint8
const (
// Straightforward case - this induces a temporary require, and thus
// a warning message about it being ephemeral.
isInManifest addType = 1 << iota
// If solving works, we'll pull this constraint from the in-memory
// manifest (where we recorded it earlier) and then append it to the
// manifest on disk.
isInImportsWithConstraint
// If solving works, we'll extract a constraint from the lock and
// append it into the manifest on disk, similar to init's behavior.
isInImportsNoConstraint
// This gets a message AND a hoist from the solution up into the
// manifest on disk.
isInNeither
)
type addInstruction struct {
id gps.ProjectIdentifier
ephReq map[string]bool
constraint gps.Constraint
typ addType
}
addInstructions := make(map[gps.ProjectRoot]addInstruction)
// A mutex for limited access to addInstructions by goroutines.
var mutex sync.Mutex
// Channel for receiving all the errors.
errCh := make(chan error, len(args))
var wg sync.WaitGroup
ctx.Out.Println("Fetching sources...")
for i, arg := range args {
wg.Add(1)
if ctx.Verbose {
ctx.Err.Printf("(%d/%d) %s\n", i+1, len(args), arg)
}
go func(arg string) {
defer wg.Done()
pc, path, err := getProjectConstraint(arg, sm)
if err != nil {
// TODO(sdboyer) ensure these errors are contextualized in a sensible way for -add
errCh <- err
return
}
// check if the the parsed path is the current root path
if strings.EqualFold(string(p.ImportRoot), string(pc.Ident.ProjectRoot)) {
errCh <- errors.New("cannot add current project to itself")
return
}
inManifest := p.Manifest.HasConstraintsOn(pc.Ident.ProjectRoot)
inImports := exmap[string(pc.Ident.ProjectRoot)]
if inManifest && inImports {
errCh <- errors.Errorf("nothing to -add, %s is already in %s and the project's direct imports or required list", pc.Ident.ProjectRoot, dep.ManifestName)
return
}
err = sm.SyncSourceFor(pc.Ident)
if err != nil {
errCh <- errors.Wrapf(err, "failed to fetch source for %s", pc.Ident.ProjectRoot)
return
}
someConstraint := !gps.IsAny(pc.Constraint) || pc.Ident.Source != ""
// Obtain a lock for addInstructions
mutex.Lock()
defer mutex.Unlock()
instr, has := addInstructions[pc.Ident.ProjectRoot]
if has {
// Multiple packages from the same project were specified as
// arguments; make sure they agree on declared constraints.
// TODO(sdboyer) until we have a general method for checking constraint equality, only allow one to declare
if someConstraint {
if !gps.IsAny(instr.constraint) || instr.id.Source != "" {
errCh <- errors.Errorf("can only specify rules once per project being added; rules were given at least twice for %s", pc.Ident.ProjectRoot)
return
}
instr.constraint = pc.Constraint
instr.id = pc.Ident
}
} else {
instr.ephReq = make(map[string]bool)
instr.constraint = pc.Constraint
instr.id = pc.Ident
}
if inManifest {
if someConstraint {
errCh <- errors.Errorf("%s already contains rules for %s, cannot specify a version constraint or alternate source", dep.ManifestName, path)
return
}
instr.ephReq[path] = true
instr.typ |= isInManifest
} else if inImports {
if !someConstraint {
if exmap[path] {
errCh <- errors.Errorf("%s is already imported or required, so -add is only valid with a constraint", path)
return
}
// No constraints, but the package isn't imported; require it.
// TODO(sdboyer) this case seems like it's getting overly specific and risks muddying the water more than it helps
instr.ephReq[path] = true
instr.typ |= isInImportsNoConstraint
} else {
// Don't require on this branch if the path was a ProjectRoot;
// most common here will be the user adding constraints to
// something they already imported, and if they specify the
// root, there's a good chance they don't actually want to
// require the project's root package, but are just trying to
// indicate which project should receive the constraints.
if !exmap[path] && string(pc.Ident.ProjectRoot) != path {
instr.ephReq[path] = true
}
instr.typ |= isInImportsWithConstraint
}
} else {
instr.typ |= isInNeither
instr.ephReq[path] = true
}
addInstructions[pc.Ident.ProjectRoot] = instr
}(arg)
}
wg.Wait()
close(errCh)
// Newline after printing the fetching source output.
ctx.Err.Println()
// Log all the errors.
if len(errCh) > 0 {
ctx.Err.Printf("Failed to add the dependencies:\n\n")
for err := range errCh {
ctx.Err.Println(" ✗", err.Error())
}
ctx.Err.Println()
return errAddDepsFailed
}
// We're now sure all of our add instructions are individually and mutually
// valid, so it's safe to begin modifying the input parameters.
for pr, instr := range addInstructions {
// The arg processing logic above only adds to the ephReq list if
// that package definitely needs to be on that list, so we don't
// need to check instr.typ here - if it's in instr.ephReq, it
// definitely needs to be added to the manifest's required list.
for path := range instr.ephReq {
p.Manifest.Required = append(p.Manifest.Required, path)
}
// Only two branches can possibly be adding rules, though the
// isInNeither case may or may not have an empty constraint.
if instr.typ&(isInNeither|isInImportsWithConstraint) != 0 {
p.Manifest.Constraints[pr] = gps.ProjectProperties{
Source: instr.id.Source,
Constraint: instr.constraint,
}
}
}
// Re-prepare a solver now that our params are complete.
solver, err := gps.Prepare(params, sm)
if err != nil {
return errors.Wrap(err, "fastpath solver prepare")
}
solution, err := solver.Solve(context.TODO())
if err != nil {
// TODO(sdboyer) detect if the failure was specifically about some of the -add arguments
return handleAllTheFailuresOfTheWorld(err)
}
// Prep post-actions and feedback from adds.
var reqlist []string
appender := dep.NewManifest()
for pr, instr := range addInstructions {
for path := range instr.ephReq {
reqlist = append(reqlist, path)
}
if instr.typ&isInManifest == 0 {
var pp gps.ProjectProperties
var found bool
for _, proj := range solution.Projects() {
// We compare just ProjectRoot instead of the whole
// ProjectIdentifier here because an empty source on the input side
// could have been converted into a source by the solver.
if proj.Ident().ProjectRoot == pr {
found = true
pp = getProjectPropertiesFromVersion(proj.Version())
break
}
}
if !found {
panic(fmt.Sprintf("unreachable: solution did not contain -add argument %s, but solver did not fail", pr))
}
pp.Source = instr.id.Source
if !gps.IsAny(instr.constraint) {
pp.Constraint = instr.constraint
}
appender.Constraints[pr] = pp
}
}
extra, err := appender.MarshalTOML()
if err != nil {
return errors.Wrap(err, "could not marshal manifest into TOML")
}
sort.Strings(reqlist)
dw, err := dep.NewDeltaWriter(p, dep.LockFromSolution(solution, p.Manifest.PruneOptions), cmd.vendorBehavior())
if err != nil {
return err
}
if cmd.dryRun {
return dw.PrintPreparedActions(ctx.Out, ctx.Verbose)
}
var logger *log.Logger
if ctx.Verbose {
logger = ctx.Err
}
if err := errors.Wrap(dw.Write(p.AbsRoot, sm, true, logger), "grouped write of manifest, lock and vendor"); err != nil {
return err
}
// FIXME(sdboyer) manifest writes ABSOLUTELY need verification - follow up!
f, err := os.OpenFile(filepath.Join(p.AbsRoot, dep.ManifestName), os.O_APPEND|os.O_WRONLY, 0666)
if err != nil {
return errors.Wrapf(err, "opening %s failed", dep.ManifestName)
}
if _, err := f.Write(extra); err != nil {
f.Close()
return errors.Wrapf(err, "writing to %s failed", dep.ManifestName)
}
switch len(reqlist) {
case 0:
// nothing to tell the user
case 1:
if cmd.noVendor {
ctx.Out.Printf("%q is not imported by your project, and has been temporarily added to %s.\n", reqlist[0], dep.LockName)
ctx.Out.Printf("If you run \"dep ensure\" again before actually importing it, it will disappear from %s. Running \"dep ensure -vendor-only\" is safe, and will guarantee it is present in vendor/.", dep.LockName)
} else {
ctx.Out.Printf("%q is not imported by your project, and has been temporarily added to %s and vendor/.\n", reqlist[0], dep.LockName)
ctx.Out.Printf("If you run \"dep ensure\" again before actually importing it, it will disappear from %s and vendor/.", dep.LockName)
}
default:
if cmd.noVendor {
ctx.Out.Printf("The following packages are not imported by your project, and have been temporarily added to %s:\n", dep.LockName)
ctx.Out.Printf("\t%s\n", strings.Join(reqlist, "\n\t"))
ctx.Out.Printf("If you run \"dep ensure\" again before actually importing them, they will disappear from %s. Running \"dep ensure -vendor-only\" is safe, and will guarantee they are present in vendor/.", dep.LockName)
} else {
ctx.Out.Printf("The following packages are not imported by your project, and have been temporarily added to %s and vendor/:\n", dep.LockName)
ctx.Out.Printf("\t%s\n", strings.Join(reqlist, "\n\t"))
ctx.Out.Printf("If you run \"dep ensure\" again before actually importing them, they will disappear from %s and vendor/.", dep.LockName)
}
}
return errors.Wrapf(f.Close(), "closing %s", dep.ManifestName)
}
func getProjectConstraint(arg string, sm gps.SourceManager) (gps.ProjectConstraint, string, error) {
emptyPC := gps.ProjectConstraint{
Constraint: gps.Any(), // default to any; avoids panics later
}
// try to split on '@'
// When there is no `@`, use any version
var versionStr string
atIndex := strings.Index(arg, "@")
if atIndex > 0 {
parts := strings.SplitN(arg, "@", 2)
arg = parts[0]
versionStr = parts[1]
}
// TODO: if we decide to keep equals.....
// split on colon if there is a network location
var source string
colonIndex := strings.Index(arg, ":")
if colonIndex > 0 {
parts := strings.SplitN(arg, ":", 2)
arg = parts[0]
source = parts[1]
}
pr, err := sm.DeduceProjectRoot(arg)
if err != nil {
return emptyPC, "", errors.Wrapf(err, "could not infer project root from dependency path: %s", arg) // this should go through to the user
}
pi := gps.ProjectIdentifier{ProjectRoot: pr, Source: source}
c, err := sm.InferConstraint(versionStr, pi)
if err != nil {
return emptyPC, "", err
}
return gps.ProjectConstraint{Ident: pi, Constraint: c}, arg, nil
}
func checkErrors(m map[string]pkgtree.PackageOrErr, ignore *pkgtree.IgnoredRuleset) (fatal bool, err error) {
var (
noGoErrors int
pkgtreeErrors = make(pkgtreeErrs, 0, len(m))
)
for ip, poe := range m {
if ignore.IsIgnored(ip) {
continue
}
if poe.Err != nil {
switch poe.Err.(type) {
case *build.NoGoError:
noGoErrors++
default:
pkgtreeErrors = append(pkgtreeErrors, poe.Err)
}
}
}
// If pkgtree was empty or all dirs lacked any Go code, return an error.
if len(m) == 0 || len(m) == noGoErrors {
return true, errors.New("no dirs contained any Go code")
}
// If all dirs contained build errors, return an error.
if len(m) == len(pkgtreeErrors) {
return true, errors.New("all dirs contained build errors")
}
// If all directories either had no Go files or caused a build error, return an error.
if len(m) == len(pkgtreeErrors)+noGoErrors {
return true, pkgtreeErrors
}
// If m contained some errors, return a warning with those errors.
if len(pkgtreeErrors) > 0 {
return false, pkgtreeErrors
}
return false, nil
}
type pkgtreeErrs []error
func (e pkgtreeErrs) Error() string {
errs := make([]string, 0, len(e))
for _, err := range e {
errs = append(errs, err.Error())
}
return fmt.Sprintf("found %d errors in the package tree:\n%s", len(e), strings.Join(errs, "\n"))
}
func validateUpdateArgs(ctx *dep.Ctx, args []string, p *dep.Project, sm gps.SourceManager, params *gps.SolveParameters) error {
// Channel for receiving all the valid arguments.
argsCh := make(chan string, len(args))
// Channel for receiving all the validation errors.
errCh := make(chan error, len(args))
var wg sync.WaitGroup
// Allow any of specified project versions to change, regardless of the lock
// file.
for _, arg := range args {
wg.Add(1)
go func(arg string) {
defer wg.Done()
// Ensure the provided path has a deducible project root.
pc, path, err := getProjectConstraint(arg, sm)
if err != nil {
// TODO(sdboyer) ensure these errors are contextualized in a sensible way for -update
errCh <- err
return
}
if path != string(pc.Ident.ProjectRoot) {
// TODO(sdboyer): does this really merit an abortive error?
errCh <- errors.Errorf("%s is not a project root, try %s instead", path, pc.Ident.ProjectRoot)
return
}
if !p.Lock.HasProjectWithRoot(pc.Ident.ProjectRoot) {
errCh <- errors.Errorf("%s is not present in %s, cannot -update it", pc.Ident.ProjectRoot, dep.LockName)
return
}
if pc.Ident.Source != "" {
errCh <- errors.Errorf("cannot specify alternate sources on -update (%s)", pc.Ident.Source)
return
}
if !gps.IsAny(pc.Constraint) {
// TODO(sdboyer) constraints should be allowed to allow solves that
// target particular versions while remaining within declared constraints.
errCh <- errors.Errorf("version constraint %s passed for %s, but -update follows constraints declared in %s, not CLI arguments", pc.Constraint, pc.Ident.ProjectRoot, dep.ManifestName)
return
}
// Valid argument.
argsCh <- arg
}(arg)
}
wg.Wait()
close(errCh)
close(argsCh)
// Log all the errors.
if len(errCh) > 0 {
ctx.Err.Printf("Invalid arguments passed to ensure -update:\n\n")
for err := range errCh {
ctx.Err.Println(" ✗", err.Error())
}
ctx.Err.Println()
return errUpdateArgsValidation
}
// Add all the valid arguments to solve params.
for arg := range argsCh {
params.ToChange = append(params.ToChange, gps.ProjectRoot(arg))
}
return nil
}
================================================
FILE: cmd/dep/ensure_test.go
================================================
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"errors"
"go/build"
"io/ioutil"
"log"
"strings"
"testing"
"github.com/golang/dep"
"github.com/golang/dep/gps"
"github.com/golang/dep/gps/pkgtree"
"github.com/golang/dep/internal/test"
)
func TestInvalidEnsureFlagCombinations(t *testing.T) {
ec := &ensureCommand{
update: true,
add: true,
}
if err := ec.validateFlags(); err == nil {
t.Error("-add and -update together should fail validation")
}
ec.vendorOnly, ec.add = true, false
if err := ec.validateFlags(); err == nil {
t.Error("-vendor-only with -update should fail validation")
}
ec.add, ec.update = true, false
if err := ec.validateFlags(); err == nil {
t.Error("-vendor-only with -add should fail validation")
}
ec.noVendor, ec.add = true, false
if err := ec.validateFlags(); err == nil {
t.Error("-vendor-only with -no-vendor should fail validation")
}
ec.noVendor = false
// Also verify that the plain ensure path takes no args. This is a shady
// test, as lots of other things COULD return errors, and we don't check
// anything other than the error being non-nil. For now, it works well
// because a panic will quickly result if the initial arg length validation
// checks are incorrectly handled.
if err := ec.runDefault(nil, []string{"foo"}, nil, nil, gps.SolveParameters{}); err == nil {
t.Errorf("no args to plain ensure with -vendor-only")
}
ec.vendorOnly = false
if err := ec.runDefault(nil, []string{"foo"}, nil, nil, gps.SolveParameters{}); err == nil {
t.Errorf("no args to plain ensure")
}
}
func TestCheckErrors(t *testing.T) {
tt := []struct {
name string
fatal bool
pkgOrErrMap map[string]pkgtree.PackageOrErr
}{
{
name: "noErrors",
fatal: false,
pkgOrErrMap: map[string]pkgtree.PackageOrErr{
"mypkg": {
P: pkgtree.Package{},
},
},
},
{
name: "hasErrors",
fatal: true,
pkgOrErrMap: map[string]pkgtree.PackageOrErr{
"github.com/me/pkg": {
Err: &build.NoGoError{},
},
"github.com/someone/pkg": {
Err: errors.New("code is busted"),
},
},
},
{
name: "onlyGoErrors",
fatal: false,
pkgOrErrMap: map[string]pkgtree.PackageOrErr{
"github.com/me/pkg": {
Err: &build.NoGoError{},
},
"github.com/someone/pkg": {
P: pkgtree.Package{},
},
},
},
{
name: "onlyBuildErrors",
fatal: false,
pkgOrErrMap: map[string]pkgtree.PackageOrErr{
"github.com/me/pkg": {
Err: &build.NoGoError{},
},
"github.com/someone/pkg": {
P: pkgtree.Package{},
},
},
},
{
name: "allGoErrors",
fatal: true,
pkgOrErrMap: map[string]pkgtree.PackageOrErr{
"github.com/me/pkg": {
Err: &build.NoGoError{},
},
},
},
{
name: "allMixedErrors",
fatal: true,
pkgOrErrMap: map[string]pkgtree.PackageOrErr{
"github.com/me/pkg": {
Err: &build.NoGoError{},
},
"github.com/someone/pkg": {
Err: errors.New("code is busted"),
},
},
},
}
for _, tc := range tt {
t.Run(tc.name, func(t *testing.T) {
fatal, err := checkErrors(tc.pkgOrErrMap, nil)
if tc.fatal != fatal {
t.Fatalf("expected fatal flag to be %T, got %T", tc.fatal, fatal)
}
if err == nil && fatal {
t.Fatal("unexpected fatal flag value while err is nil")
}
})
}
}
func TestValidateUpdateArgs(t *testing.T) {
cases := []struct {
name string
args []string
wantError error
wantWarn []string
lockedProjects []string
}{
{
name: "empty args",
args: []string{},
wantError: nil,
},
{
name: "not project root",
args: []string{"github.com/golang/dep/cmd"},
wantError: errUpdateArgsValidation,
wantWarn: []string{
"github.com/golang/dep/cmd is not a project root, try github.com/golang/dep instead",
},
},
{
name: "not present in lock",
args: []string{"github.com/golang/dep"},
wantError: errUpdateArgsValidation,
wantWarn: []string{
"github.com/golang/dep is not present in Gopkg.lock, cannot -update it",
},
},
{
name: "cannot specify alternate sources",
args: []string{"github.com/golang/dep:github.com/example/dep"},
wantError: errUpdateArgsValidation,
wantWarn: []string{
"cannot specify alternate sources on -update (github.com/example/dep)",
},
lockedProjects: []string{"github.com/golang/dep"},
},
{
name: "version constraint passed",
args: []string{"github.com/golang/dep@master"},
wantError: errUpdateArgsValidation,
wantWarn: []string{
"version constraint master passed for github.com/golang/dep, but -update follows constraints declared in Gopkg.toml, not CLI arguments",
},
lockedProjects: []string{"github.com/golang/dep"},
},
{
name: "flags after spec",
args: []string{"github.com/golang/dep@master", "-v"},
wantError: errUpdateArgsValidation,
wantWarn: []string{
"could not infer project root from dependency path",
},
lockedProjects: []string{"github.com/golang/dep"},
},
}
h := test.NewHelper(t)
defer h.Cleanup()
h.TempDir("src")
pwd := h.Path(".")
stderrOutput := &bytes.Buffer{}
errLogger := log.New(stderrOutput, "", 0)
ctx := &dep.Ctx{
GOPATH: pwd,
Out: log.New(ioutil.Discard, "", 0),
Err: errLogger,
}
sm, err := ctx.SourceManager()
h.Must(err)
defer sm.Release()
p := new(dep.Project)
params := p.MakeParams()
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
// Empty the buffer for every case
stderrOutput.Reset()
// Fill up the locked projects
lockedProjects := make([]gps.LockedProject, 0, len(c.lockedProjects))
for _, lp := range c.lockedProjects {
pi := gps.ProjectIdentifier{ProjectRoot: gps.ProjectRoot(lp)}
lockedProjects = append(lockedProjects, gps.NewLockedProject(pi, gps.NewVersion("v1.0.0"), []string{}))
}
// Add lock to project
p.Lock = &dep.Lock{P: lockedProjects}
err := validateUpdateArgs(ctx, c.args, p, sm, ¶ms)
if err != c.wantError {
t.Fatalf("Unexpected error while validating update args:\n\t(GOT): %v\n\t(WNT): %v", err, c.wantError)
}
warnings := stderrOutput.String()
for _, warn := range c.wantWarn {
if !strings.Contains(warnings, warn) {
t.Fatalf("Expected validateUpdateArgs errors to contain: %q", warn)
}
}
})
}
}
================================================
FILE: cmd/dep/failures.go
================================================
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"context"
"github.com/golang/dep/gps"
"github.com/pkg/errors"
)
// TODO solve failures can be really creative - we need to be similarly creative
// in handling them and informing the user appropriately
func handleAllTheFailuresOfTheWorld(err error) error {
switch errors.Cause(err) {
case context.Canceled, context.DeadlineExceeded, gps.ErrSourceManagerIsReleased:
return nil
}
return errors.Wrap(err, "Solving failure")
}
================================================
FILE: cmd/dep/feature_flags.go
================================================
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"strconv"
)
const (
flagImportDuringSolveKey = "ImportDuringSolve"
)
var (
flagImportDuringSolve = "false"
)
var featureFlags = map[string]bool{
flagImportDuringSolveKey: parseFeatureFlag(flagImportDuringSolve),
}
func parseFeatureFlag(flag string) bool {
flagValue, _ := strconv.ParseBool(flag)
return flagValue
}
func readFeatureFlag(flag string) (bool, error) {
if flagValue, ok := featureFlags[flag]; ok {
return flagValue, nil
}
return false, fmt.Errorf("undefined feature flag: %s", flag)
}
func importDuringSolve() bool {
return featureFlags[flagImportDuringSolveKey]
}
================================================
FILE: cmd/dep/gopath_scanner.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"os"
"path/filepath"
"strings"
"sync"
"github.com/golang/dep"
"github.com/golang/dep/gps"
"github.com/golang/dep/gps/paths"
"github.com/golang/dep/gps/pkgtree"
fb "github.com/golang/dep/internal/feedback"
"github.com/golang/dep/internal/fs"
"github.com/pkg/errors"
)
// gopathScanner supplies manifest/lock data by scanning the contents of GOPATH
// It uses its results to fill-in any missing details left by the rootAnalyzer.
type gopathScanner struct {
ctx *dep.Ctx
directDeps map[gps.ProjectRoot]bool
sm gps.SourceManager
pd projectData
origM *dep.Manifest
origL *dep.Lock
}
func newGopathScanner(ctx *dep.Ctx, directDeps map[gps.ProjectRoot]bool, sm gps.SourceManager) *gopathScanner {
return &gopathScanner{
ctx: ctx,
directDeps: directDeps,
sm: sm,
}
}
// InitializeRootManifestAndLock performs analysis of the filesystem tree rooted
// at path, with the root import path importRoot, to determine the project's
// constraints. Respect any initial constraints defined in the root manifest and
// lock.
func (g *gopathScanner) InitializeRootManifestAndLock(rootM *dep.Manifest, rootL *dep.Lock) error {
var err error
g.ctx.Err.Println("Searching GOPATH for projects...")
g.pd, err = g.scanGopathForDependencies()
if err != nil {
return err
}
g.origM = dep.NewManifest()
g.origM.Constraints = g.pd.constraints
g.origL = &dep.Lock{
P: make([]gps.LockedProject, 0, len(g.pd.ondisk)),
}
for pr, v := range g.pd.ondisk {
// That we have to chop off these path prefixes is a symptom of
// a problem in gps itself
pkgs := make([]string, 0, len(g.pd.dependencies[pr]))
prslash := string(pr) + "/"
for _, pkg := range g.pd.dependencies[pr] {
if pkg == string(pr) {
pkgs = append(pkgs, ".")
} else {
pkgs = append(pkgs, trimPathPrefix(pkg, prslash))
}
}
g.origL.P = append(g.origL.P, gps.NewLockedProject(
gps.ProjectIdentifier{ProjectRoot: pr}, v, pkgs),
)
}
g.overlay(rootM, rootL)
return nil
}
// Fill in gaps in the root manifest/lock with data found from the GOPATH.
func (g *gopathScanner) overlay(rootM *dep.Manifest, rootL *dep.Lock) {
for pkg, prj := range g.origM.Constraints {
if _, has := rootM.Constraints[pkg]; has {
continue
}
rootM.Constraints[pkg] = prj
v := g.pd.ondisk[pkg]
pi := gps.ProjectIdentifier{ProjectRoot: pkg, Source: prj.Source}
f := fb.NewConstraintFeedback(gps.ProjectConstraint{Ident: pi, Constraint: v}, fb.DepTypeDirect)
f.LogFeedback(g.ctx.Err)
f = fb.NewLockedProjectFeedback(gps.NewLockedProject(pi, v, nil), fb.DepTypeDirect)
f.LogFeedback(g.ctx.Err)
}
// Keep track of which projects have been locked
lockedProjects := map[gps.ProjectRoot]bool{}
for _, lp := range rootL.P {
lockedProjects[lp.Ident().ProjectRoot] = true
}
for _, lp := range g.origL.P {
pkg := lp.Ident().ProjectRoot
if _, isLocked := lockedProjects[pkg]; isLocked {
continue
}
rootL.P = append(rootL.P, lp)
lockedProjects[pkg] = true
if _, isDirect := g.directDeps[pkg]; !isDirect {
f := fb.NewLockedProjectFeedback(lp, fb.DepTypeTransitive)
f.LogFeedback(g.ctx.Err)
}
}
// Identify projects whose version is unknown and will have to be solved for
var missing []string // all project roots missing from GOPATH
var missingVCS []string // all project roots missing VCS information
for pr := range g.pd.notondisk {
if _, isLocked := lockedProjects[pr]; isLocked {
continue
}
if g.pd.invalidSVC[pr] {
missingVCS = append(missingVCS, string(pr))
} else {
missing = append(missing, string(pr))
}
}
missingStr := ""
missingVCSStr := ""
if len(missing) > 0 {
missingStr = fmt.Sprintf("The following dependencies were not found in GOPATH:\n %s\n\n",
strings.Join(missing, "\n "))
}
if len(missingVCS) > 0 {
missingVCSStr = fmt.Sprintf("The following dependencies found in GOPATH were missing VCS information (a remote source is required):\n %s\n\n",
strings.Join(missingVCS, "\n "))
}
if len(missingVCS)+len(missing) > 0 {
g.ctx.Err.Printf("\n%s%sThe most recent version of these projects will be used.\n\n", missingStr, missingVCSStr)
}
}
func trimPathPrefix(p1, p2 string) string {
if isPrefix, _ := fs.HasFilepathPrefix(p1, p2); isPrefix {
return p1[len(p2):]
}
return p1
}
// contains checks if a array of strings contains a value
func contains(a []string, b string) bool {
for _, v := range a {
if b == v {
return true
}
}
return false
}
// getProjectPropertiesFromVersion takes a Version and returns a proper
// ProjectProperties with Constraint value based on the provided version.
func getProjectPropertiesFromVersion(v gps.Version) gps.ProjectProperties {
pp := gps.ProjectProperties{}
// extract version and ignore if it's revision only
switch tv := v.(type) {
case gps.PairedVersion:
v = tv.Unpair()
case gps.Revision:
return pp
}
switch v.Type() {
case gps.IsBranch, gps.IsVersion:
pp.Constraint = v
case gps.IsSemver:
c, err := gps.NewSemverConstraintIC(v.String())
if err != nil {
panic(err)
}
pp.Constraint = c
}
return pp
}
type projectData struct {
constraints gps.ProjectConstraints // constraints that could be found
dependencies map[gps.ProjectRoot][]string // all dependencies (imports) found by project root
notondisk map[gps.ProjectRoot]bool // projects that were not found on disk
invalidSVC map[gps.ProjectRoot]bool // projects that were found on disk but SVC data could not be read
ondisk map[gps.ProjectRoot]gps.Version // projects that were found on disk
}
func (g *gopathScanner) scanGopathForDependencies() (projectData, error) {
constraints := make(gps.ProjectConstraints)
dependencies := make(map[gps.ProjectRoot][]string)
packages := make(map[string]bool)
notondisk := make(map[gps.ProjectRoot]bool)
invalidSVC := make(map[gps.ProjectRoot]bool)
ondisk := make(map[gps.ProjectRoot]gps.Version)
var syncDepGroup sync.WaitGroup
syncDep := func(pr gps.ProjectRoot, sm gps.SourceManager) {
if err := sm.SyncSourceFor(gps.ProjectIdentifier{ProjectRoot: pr}); err != nil {
g.ctx.Err.Printf("%+v", errors.Wrapf(err, "Unable to cache %s", pr))
}
syncDepGroup.Done()
}
if len(g.directDeps) == 0 {
return projectData{}, nil
}
for ippr := range g.directDeps {
// TODO(sdboyer) these are not import paths by this point, they've
// already been worked down to project roots.
ip := string(ippr)
pr, err := g.sm.DeduceProjectRoot(ip)
if err != nil {
return projectData{}, errors.Wrap(err, "sm.DeduceProjectRoot")
}
packages[ip] = true
if _, has := dependencies[pr]; has {
dependencies[pr] = append(dependencies[pr], ip)
continue
}
syncDepGroup.Add(1)
go syncDep(pr, g.sm)
dependencies[pr] = []string{ip}
abs, err := g.ctx.AbsForImport(string(pr))
if err != nil {
notondisk[pr] = true
continue
}
v, err := gps.VCSVersion(abs)
if err != nil {
invalidSVC[pr] = true
notondisk[pr] = true
continue
}
ondisk[pr] = v
pp := getProjectPropertiesFromVersion(v)
if pp.Constraint != nil || pp.Source != "" {
constraints[pr] = pp
}
}
// Explore the packages we've found for transitive deps, either
// completing the lock or identifying (more) missing projects that we'll
// need to ask gps to solve for us.
colors := make(map[string]uint8)
const (
white uint8 = iota
grey
black
)
// cache of PackageTrees, so we don't parse projects more than once
ptrees := make(map[gps.ProjectRoot]pkgtree.PackageTree)
// depth-first traverser
var dft func(string) error
dft = func(pkg string) error {
switch colors[pkg] {
case white:
colors[pkg] = grey
pr, err := g.sm.DeduceProjectRoot(pkg)
if err != nil {
return errors.Wrap(err, "could not deduce project root for "+pkg)
}
// We already visited this project root earlier via some other
// pkg within it, and made the decision that it's not on disk.
// Respect that decision, and pop the stack.
if notondisk[pr] {
colors[pkg] = black
return nil
}
ptree, has := ptrees[pr]
if !has {
// It's fine if the root does not exist - it indicates that this
// project is not present in the workspace, and so we need to
// solve to deal with this dep.
r := filepath.Join(g.ctx.GOPATH, "src", string(pr))
fi, err := os.Stat(r)
if os.IsNotExist(err) || !fi.IsDir() {
colors[pkg] = black
notondisk[pr] = true
return nil
}
// We know the project is on disk; the question is whether we're
// first seeing it here, in the transitive exploration, or if it
// was found in the initial pass on direct imports. We know it's
// the former if there's no entry for it in the ondisk map.
if _, in := ondisk[pr]; !in {
abs, err := g.ctx.AbsForImport(string(pr))
if err != nil {
colors[pkg] = black
notondisk[pr] = true
return nil
}
v, err := gps.VCSVersion(abs)
if err != nil {
// Even if we know it's on disk, errors are still
// possible when trying to deduce version. If we
// encounter such an error, just treat the project as
// not being on disk; the solver will work it out.
colors[pkg] = black
notondisk[pr] = true
return nil
}
ondisk[pr] = v
}
ptree, err = pkgtree.ListPackages(r, string(pr))
if err != nil {
// Any error here other than an a nonexistent dir (which
// can't happen because we covered that case above) is
// probably critical, so bail out.
return errors.Wrap(err, "gps.ListPackages")
}
ptrees[pr] = ptree
}
// Get a reachmap that includes main pkgs (even though importing
// them is an error, what we're checking right now is simply whether
// there's a package with go code present on disk), and does not
// backpropagate errors (again, because our only concern right now
// is package existence).
rm, errmap := ptree.ToReachMap(true, false, false, nil)
reached, ok := rm[pkg]
if !ok {
colors[pkg] = black
// not on disk...
notondisk[pr] = true
return nil
}
if _, ok := errmap[pkg]; ok {
// The package is on disk, but contains some errors.
colors[pkg] = black
return nil
}
if deps, has := dependencies[pr]; has {
if !contains(deps, pkg) {
dependencies[pr] = append(deps, pkg)
}
} else {
dependencies[pr] = []string{pkg}
syncDepGroup.Add(1)
go syncDep(pr, g.sm)
}
// recurse
for _, rpkg := range reached.External {
if paths.IsStandardImportPath(rpkg) {
continue
}
err := dft(rpkg)
if err != nil {
// Bubble up any errors we encounter
return err
}
}
colors[pkg] = black
case grey:
return errors.Errorf("Import cycle detected on %s", pkg)
}
return nil
}
// run the depth-first traversal from the set of immediate external
// package imports we found in the current project
for pkg := range packages {
err := dft(pkg)
if err != nil {
return projectData{}, err // already errors.Wrap()'d internally
}
}
syncDepGroup.Wait()
pd := projectData{
constraints: constraints,
dependencies: dependencies,
invalidSVC: invalidSVC,
notondisk: notondisk,
ondisk: ondisk,
}
return pd, nil
}
================================================
FILE: cmd/dep/gopath_scanner_test.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"io/ioutil"
"log"
"reflect"
"testing"
"github.com/golang/dep"
"github.com/golang/dep/gps"
"github.com/golang/dep/internal/test"
)
const testProject1 = "github.com/sdboyer/deptest"
const testProject2 = "github.com/sdboyer/deptestdos"
// NewTestContext creates a unique context with its own GOPATH for a single test.
func NewTestContext(h *test.Helper) *dep.Ctx {
h.TempDir("src")
pwd := h.Path(".")
discardLogger := log.New(ioutil.Discard, "", 0)
return &dep.Ctx{
GOPATH: pwd,
Out: discardLogger,
Err: discardLogger,
}
}
func TestGopathScanner_OverlayManifestConstraints(t *testing.T) {
h := test.NewHelper(t)
h.Parallel()
defer h.Cleanup()
ctx := NewTestContext(h)
pi1 := gps.ProjectIdentifier{ProjectRoot: gps.ProjectRoot(testProject1)}
pi2 := gps.ProjectIdentifier{ProjectRoot: gps.ProjectRoot(testProject2)}
v1 := gps.NewVersion("v1.0.0")
v2 := gps.NewVersion("v2.0.0")
v3 := gps.NewVersion("v3.0.0")
rootM := dep.NewManifest()
rootM.Constraints[pi1.ProjectRoot] = gps.ProjectProperties{Constraint: v1}
rootL := &dep.Lock{}
origM := dep.NewManifest()
origM.Constraints[pi1.ProjectRoot] = gps.ProjectProperties{Constraint: v2}
origM.Constraints[pi2.ProjectRoot] = gps.ProjectProperties{Constraint: v3}
gs := gopathScanner{
origM: origM,
origL: &dep.Lock{},
ctx: ctx,
pd: projectData{
ondisk: map[gps.ProjectRoot]gps.Version{
pi1.ProjectRoot: v2,
pi2.ProjectRoot: v3,
},
},
}
gs.overlay(rootM, rootL)
dep, has := rootM.Constraints[pi1.ProjectRoot]
if !has {
t.Fatalf("Expected the root manifest to contain %s", pi1.ProjectRoot)
}
wantC := v1.String()
gotC := dep.Constraint.String()
if wantC != gotC {
t.Fatalf("Expected %s to be constrained to '%s', got '%s'", pi1.ProjectRoot, wantC, gotC)
}
dep, has = rootM.Constraints[pi2.ProjectRoot]
if !has {
t.Fatalf("Expected the root manifest to contain %s", pi2.ProjectRoot)
}
wantC = v3.String()
gotC = dep.Constraint.String()
if wantC != gotC {
t.Fatalf("Expected %s to be constrained to '%s', got '%s'", pi2.ProjectRoot, wantC, gotC)
}
}
func TestGopathScanner_OverlayLockProjects(t *testing.T) {
h := test.NewHelper(t)
h.Parallel()
defer h.Cleanup()
ctx := NewTestContext(h)
rootM := dep.NewManifest()
pi1 := gps.ProjectIdentifier{ProjectRoot: gps.ProjectRoot(testProject1)}
pi2 := gps.ProjectIdentifier{ProjectRoot: gps.ProjectRoot(testProject2)}
v1 := gps.NewVersion("v1.0.0")
v2 := gps.NewVersion("v2.0.0")
v3 := gps.NewVersion("v3.0.0")
rootL := &dep.Lock{
P: []gps.LockedProject{gps.NewLockedProject(pi1, v1, []string{})},
}
gs := gopathScanner{
origM: dep.NewManifest(),
origL: &dep.Lock{
P: []gps.LockedProject{
gps.NewLockedProject(pi1, v2, []string{}), // ignored, already exists in lock
gps.NewLockedProject(pi2, v3, []string{}), // should be added to the lock
},
},
ctx: ctx,
pd: projectData{
ondisk: map[gps.ProjectRoot]gps.Version{
pi1.ProjectRoot: v2,
pi2.ProjectRoot: v3,
},
},
}
gs.overlay(rootM, rootL)
if len(rootL.P) != 2 {
t.Fatalf("Expected the root manifest to contain 2 packages, got %d", len(rootL.P))
}
if rootL.P[0].Version() != v1 {
t.Fatalf("Expected %s to be locked to '%s', got '%s'", rootL.P[0].Ident().ProjectRoot, v1, rootL.P[0].Version())
}
if rootL.P[1].Version() != v3 {
t.Fatalf("Expected %s to be locked to '%s', got '%s'", rootL.P[1].Ident().ProjectRoot, v3, rootL.P[1].Version())
}
}
func TestContains(t *testing.T) {
t.Parallel()
a := []string{"a", "b", "abcd"}
if !contains(a, "a") {
t.Fatal("expected array to contain 'a'")
}
if contains(a, "d") {
t.Fatal("expected array to not contain 'd'")
}
}
func TestGetProjectPropertiesFromVersion(t *testing.T) {
t.Parallel()
wantSemver, _ := gps.NewSemverConstraintIC("v1.0.0")
cases := []struct {
version, want gps.Constraint
}{
{
version: gps.NewBranch("foo-branch"),
want: gps.NewBranch("foo-branch"),
},
{
version: gps.NewVersion("foo-version"),
want: gps.NewVersion("foo-version"),
},
{
version: gps.NewVersion("v1.0.0"),
want: wantSemver,
},
{
version: gps.NewBranch("foo-branch").Pair("some-revision"),
want: gps.NewBranch("foo-branch"),
},
{
version: gps.NewVersion("foo-version").Pair("some-revision"),
want: gps.NewVersion("foo-version"),
},
{
version: gps.Revision("some-revision"),
want: nil,
},
{
version: gps.NewVersion("v1.0.0").Pair("some-revision"),
want: wantSemver,
},
}
for _, c := range cases {
actualProp := getProjectPropertiesFromVersion(c.version.(gps.Version))
if !reflect.DeepEqual(c.want, actualProp.Constraint) {
t.Fatalf("Constraints are not as expected: \n\t(GOT) %v\n\t(WNT) %v", actualProp.Constraint, c.want)
}
}
}
================================================
FILE: cmd/dep/graphviz.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"fmt"
"hash/fnv"
"sort"
"strings"
)
type graphviz struct {
ps []*gvnode
b bytes.Buffer
h map[string]uint32
// clusters is a map of project name and subgraph object. This can be used
// to refer the subgraph by project name.
clusters map[string]*gvsubgraph
}
type gvnode struct {
project string
version string
children []string
}
// Sort gvnode(s).
type byGvnode []gvnode
func (n byGvnode) Len() int { return len(n) }
func (n byGvnode) Swap(i, j int) { n[i], n[j] = n[j], n[i] }
func (n byGvnode) Less(i, j int) bool { return n[i].project < n[j].project }
func (g graphviz) New() *graphviz {
ga := &graphviz{
ps: []*gvnode{},
h: make(map[string]uint32),
clusters: make(map[string]*gvsubgraph),
}
return ga
}
func (g *graphviz) output(project string) bytes.Buffer {
if project == "" {
// Project relations graph.
g.b.WriteString("digraph {\n\tnode [shape=box];")
for _, gvp := range g.ps {
// Create node string
g.b.WriteString(fmt.Sprintf("\n\t%d [label=\"%s\"];", gvp.hash(), gvp.label()))
}
g.createProjectRelations()
} else {
// Project-Package relations graph.
g.b.WriteString("digraph {\n\tnode [shape=box];\n\tcompound=true;\n\tedge [minlen=2];")
// Declare all the nodes with labels.
for _, gvp := range g.ps {
g.b.WriteString(fmt.Sprintf("\n\t%d [label=\"%s\"];", gvp.hash(), gvp.label()))
}
// Sort the clusters for a consistent output.
clusters := sortClusters(g.clusters)
// Declare all the subgraphs with labels.
for _, gsg := range clusters {
g.b.WriteString(fmt.Sprintf("\n\tsubgraph cluster_%d {", gsg.index))
g.b.WriteString(fmt.Sprintf("\n\t\tlabel = \"%s\";", gsg.project))
nhashes := []string{}
for _, pkg := range gsg.packages {
nhashes = append(nhashes, fmt.Sprint(g.h[pkg]))
}
g.b.WriteString(fmt.Sprintf("\n\t\t%s;", strings.Join(nhashes, " ")))
g.b.WriteString("\n\t}")
}
g.createProjectPackageRelations(project, clusters)
}
g.b.WriteString("\n}\n")
return g.b
}
func (g *graphviz) createProjectRelations() {
// Store relations to avoid duplication
rels := make(map[string]bool)
// Create relations
for _, dp := range g.ps {
for _, bsc := range dp.children {
for pr, hsh := range g.h {
if isPathPrefix(bsc, pr) {
r := fmt.Sprintf("\n\t%d -> %d", g.h[dp.project], hsh)
if _, ex := rels[r]; !ex {
g.b.WriteString(r + ";")
rels[r] = true
}
}
}
}
}
}
func (g *graphviz) createProjectPackageRelations(project string, clusters []*gvsubgraph) {
// This function takes a child package/project, target project, subgraph meta, from
// and to of the edge and write a relation.
linkRelation := func(child, project string, meta []string, from, to uint32) {
if child == project {
// Check if it's a cluster.
target, ok := g.clusters[project]
if ok {
// It's a cluster. Point to the Project Root. Use lhead.
meta = append(meta, fmt.Sprintf("lhead=cluster_%d", target.index))
// When the head points to a cluster root, use the first
// node in the cluster as to.
to = g.h[target.packages[0]]
}
}
if len(meta) > 0 {
g.b.WriteString(fmt.Sprintf("\n\t%d -> %d [%s];", from, to, strings.Join(meta, " ")))
} else {
g.b.WriteString(fmt.Sprintf("\n\t%d -> %d;", from, to))
}
}
// Create relations from nodes.
for _, node := range g.ps {
for _, child := range node.children {
// Only if it points to the target project, proceed further.
if isPathPrefix(child, project) {
meta := []string{}
from := g.h[node.project]
to := g.h[child]
linkRelation(child, project, meta, from, to)
}
}
}
// Create relations from clusters.
for _, cluster := range clusters {
for _, child := range cluster.children {
// Only if it points to the target project, proceed further.
if isPathPrefix(child, project) {
meta := []string{fmt.Sprintf("ltail=cluster_%d", cluster.index)}
// When the tail is from a cluster, use the first node in the
// cluster as from.
from := g.h[cluster.packages[0]]
to := g.h[child]
linkRelation(child, project, meta, from, to)
}
}
}
}
func (g *graphviz) createNode(project, version string, children []string) {
pr := &gvnode{
project: project,
version: version,
children: children,
}
g.h[pr.project] = pr.hash()
g.ps = append(g.ps, pr)
}
func (dp gvnode) hash() uint32 {
h := fnv.New32a()
h.Write([]byte(dp.project))
return h.Sum32()
}
func (dp gvnode) label() string {
label := []string{dp.project}
if dp.version != "" {
label = append(label, dp.version)
}
return strings.Join(label, "\\n")
}
// isPathPrefix ensures that the literal string prefix is a path tree match and
// guards against possibilities like this:
//
// github.com/sdboyer/foo
// github.com/sdboyer/foobar/baz
//
// Verify that prefix is path match and either the input is the same length as
// the match (in which case we know they're equal), or that the next character
// is a "/". (Import paths are defined to always use "/", not the OS-specific
// path separator.)
func isPathPrefix(path, pre string) bool {
pathlen, prflen := len(path), len(pre)
if pathlen < prflen || path[0:prflen] != pre {
return false
}
return prflen == pathlen || strings.Index(path[prflen:], "/") == 0
}
// gvsubgraph is a graphviz subgraph with at least one node(package) in it.
type gvsubgraph struct {
project string // Project root name of a project.
packages []string // List of subpackages in the project.
index int // Index of the subgraph cluster. This is used to refer the subgraph in the dot file.
children []string // Dependencies of the project root package.
}
func (sg gvsubgraph) hash() uint32 {
h := fnv.New32a()
h.Write([]byte(sg.project))
return h.Sum32()
}
// createSubgraph creates a graphviz subgraph with nodes in it. This should only
// be created when a project has more than one package. A single package project
// should be just a single node.
// First nodes are created using the provided packages and their imports. Then
// a subgraph is created with all the nodes in it.
func (g *graphviz) createSubgraph(project string, packages map[string][]string) {
// If there's only a single package and that's the project root, do not
// create a subgraph. Just create a node.
if children, ok := packages[project]; ok && len(packages) == 1 {
g.createNode(project, "", children)
return
}
// Sort and use the packages for consistent output.
pkgs := []gvnode{}
for name, children := range packages {
pkgs = append(pkgs, gvnode{project: name, children: children})
}
sort.Sort(byGvnode(pkgs))
subgraphPkgs := []string{}
rootChildren := []string{}
for _, p := range pkgs {
if p.project == project {
// Do not create a separate node for the root package.
rootChildren = append(rootChildren, p.children...)
continue
}
g.createNode(p.project, "", p.children)
subgraphPkgs = append(subgraphPkgs, p.project)
}
sg := &gvsubgraph{
project: project,
packages: subgraphPkgs,
index: len(g.clusters),
children: rootChildren,
}
g.h[project] = sg.hash()
g.clusters[project] = sg
}
// sortCluster takes a map of all the clusters and returns a list of cluster
// names sorted by the cluster index.
func sortClusters(clusters map[string]*gvsubgraph) []*gvsubgraph {
result := []*gvsubgraph{}
for _, cluster := range clusters {
result = append(result, cluster)
}
sort.Slice(result, func(i, j int) bool {
return result[i].index < result[j].index
})
return result
}
================================================
FILE: cmd/dep/graphviz_test.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"reflect"
"testing"
"github.com/golang/dep/internal/test"
)
func TestEmptyProject(t *testing.T) {
h := test.NewHelper(t)
h.Parallel()
defer h.Cleanup()
g := new(graphviz).New()
b := g.output("")
want := h.GetTestFileString("graphviz/empty.dot")
if b.String() != want {
t.Fatalf("expected '%v', got '%v'", want, b.String())
}
}
func TestSimpleProject(t *testing.T) {
h := test.NewHelper(t)
h.Parallel()
defer h.Cleanup()
g := new(graphviz).New()
g.createNode("project", "", []string{"foo", "bar"})
g.createNode("foo", "master", []string{"bar"})
g.createNode("bar", "dev", []string{})
b := g.output("")
want := h.GetTestFileString("graphviz/case1.dot")
if b.String() != want {
t.Fatalf("expected '%v', got '%v'", want, b.String())
}
}
func TestNoLinks(t *testing.T) {
h := test.NewHelper(t)
h.Parallel()
defer h.Cleanup()
g := new(graphviz).New()
g.createNode("project", "", []string{})
b := g.output("")
want := h.GetTestFileString("graphviz/case2.dot")
if b.String() != want {
t.Fatalf("expected '%v', got '%v'", want, b.String())
}
}
func TestIsPathPrefix(t *testing.T) {
t.Parallel()
tcs := []struct {
path string
pre string
want bool
}{
{"github.com/sdboyer/foo/bar", "github.com/sdboyer/foo", true},
{"github.com/sdboyer/foobar", "github.com/sdboyer/foo", false},
{"github.com/sdboyer/bar/foo", "github.com/sdboyer/foo", false},
{"golang.org/sdboyer/bar/foo", "github.com/sdboyer/foo", false},
{"golang.org/sdboyer/FOO", "github.com/sdboyer/foo", false},
}
for _, tc := range tcs {
r := isPathPrefix(tc.path, tc.pre)
if tc.want != r {
t.Fatalf("expected '%v', got '%v'", tc.want, r)
}
}
}
func TestSimpleSubgraphs(t *testing.T) {
type testProject struct {
name string
packages map[string][]string
}
testCases := []struct {
name string
projects []testProject
targetProject string
outputfile string
}{
{
name: "simple graph",
projects: []testProject{
{
name: "ProjectA",
packages: map[string][]string{
"ProjectA/pkgX": []string{"ProjectC/pkgZ", "ProjectB/pkgX"},
"ProjectA/pkgY": []string{"ProjectC/pkgX"},
},
},
{
name: "ProjectB",
packages: map[string][]string{
"ProjectB/pkgX": []string{},
"ProjectB/pkgY": []string{"ProjectA/pkgY", "ProjectC/pkgZ"},
},
},
{
name: "ProjectC",
packages: map[string][]string{
"ProjectC/pkgX": []string{},
"ProjectC/pkgY": []string{},
"ProjectC/pkgZ": []string{},
},
},
},
targetProject: "ProjectC",
outputfile: "graphviz/subgraph1.dot",
},
{
name: "edges from and to root projects",
projects: []testProject{
{
name: "ProjectB",
packages: map[string][]string{
"ProjectB": []string{"ProjectC/pkgX", "ProjectC"},
"ProjectB/pkgX": []string{},
"ProjectB/pkgY": []string{"ProjectA/pkgY", "ProjectC/pkgZ"},
"ProjectB/pkgZ": []string{"ProjectC"},
},
},
{
name: "ProjectC",
packages: map[string][]string{
"ProjectC/pkgX": []string{},
"ProjectC/pkgY": []string{},
"ProjectC/pkgZ": []string{},
},
},
},
targetProject: "ProjectC",
outputfile: "graphviz/subgraph2.dot",
},
{
name: "multi and single package projects",
projects: []testProject{
{
name: "ProjectA",
packages: map[string][]string{
"ProjectA": []string{"ProjectC/pkgX"},
},
},
{
name: "ProjectB",
packages: map[string][]string{
"ProjectB": []string{"ProjectC/pkgX", "ProjectC"},
"ProjectB/pkgX": []string{},
"ProjectB/pkgY": []string{"ProjectA/pkgY", "ProjectC/pkgZ"},
"ProjectB/pkgZ": []string{"ProjectC"},
},
},
{
name: "ProjectC",
packages: map[string][]string{
"ProjectC/pkgX": []string{},
"ProjectC/pkgY": []string{},
"ProjectC/pkgZ": []string{},
},
},
},
targetProject: "ProjectC",
outputfile: "graphviz/subgraph3.dot",
},
{
name: "relation from a cluster to a node",
projects: []testProject{
{
name: "ProjectB",
packages: map[string][]string{
"ProjectB": []string{"ProjectC/pkgX", "ProjectA"},
"ProjectB/pkgX": []string{},
"ProjectB/pkgY": []string{"ProjectA", "ProjectC/pkgZ"},
"ProjectB/pkgZ": []string{"ProjectC"},
},
},
{
name: "ProjectA",
packages: map[string][]string{
"ProjectA": []string{"ProjectC/pkgX"},
},
},
},
targetProject: "ProjectA",
outputfile: "graphviz/subgraph4.dot",
},
}
h := test.NewHelper(t)
h.Parallel()
defer h.Cleanup()
for _, tc := range testCases {
g := new(graphviz).New()
for _, project := range tc.projects {
g.createSubgraph(project.name, project.packages)
}
output := g.output(tc.targetProject)
want := h.GetTestFileString(tc.outputfile)
if output.String() != want {
t.Fatalf("expected '%v', got '%v'", want, output.String())
}
}
}
func TestCreateSubgraph(t *testing.T) {
testCases := []struct {
name string
project string
pkgs map[string][]string
wantNodes []*gvnode
wantClusters map[string]*gvsubgraph
}{
{
name: "Project with subpackages",
project: "ProjectA",
pkgs: map[string][]string{
"ProjectA/pkgX": []string{"ProjectC/pkgZ", "ProjectB/pkgX"},
"ProjectA/pkgY": []string{"ProjectC/pkgX"},
},
wantNodes: []*gvnode{
&gvnode{
project: "ProjectA/pkgX",
children: []string{"ProjectC/pkgZ", "ProjectB/pkgX"},
},
&gvnode{
project: "ProjectA/pkgY",
children: []string{"ProjectC/pkgX"},
},
},
wantClusters: map[string]*gvsubgraph{
"ProjectA": &gvsubgraph{
project: "ProjectA",
packages: []string{"ProjectA/pkgX", "ProjectA/pkgY"},
index: 0,
children: []string{},
},
},
},
{
name: "Project with single subpackage at root",
project: "ProjectA",
pkgs: map[string][]string{
"ProjectA": []string{"ProjectC/pkgZ", "ProjectB/pkgX"},
},
wantNodes: []*gvnode{
&gvnode{
project: "ProjectA",
children: []string{"ProjectC/pkgZ", "ProjectB/pkgX"},
},
},
wantClusters: map[string]*gvsubgraph{},
},
{
name: "Project with subpackages and no children",
project: "ProjectX",
pkgs: map[string][]string{
"ProjectX/pkgA": []string{},
},
wantNodes: []*gvnode{
&gvnode{
project: "ProjectX/pkgA",
children: []string{},
},
},
wantClusters: map[string]*gvsubgraph{
"ProjectX": &gvsubgraph{
project: "ProjectX",
packages: []string{"ProjectX/pkgA"},
index: 0,
children: []string{},
},
},
},
{
name: "Project with subpackage and root package with children",
project: "ProjectA",
pkgs: map[string][]string{
"ProjectA": []string{"ProjectC/pkgZ", "ProjectB/pkgX"},
"ProjectA/pkgX": []string{"ProjectC/pkgA"},
},
wantNodes: []*gvnode{
&gvnode{
project: "ProjectA/pkgX",
children: []string{"ProjectC/pkgA"},
},
},
wantClusters: map[string]*gvsubgraph{
"ProjectA": &gvsubgraph{
project: "ProjectA",
packages: []string{"ProjectA/pkgX"},
index: 0,
children: []string{"ProjectC/pkgZ", "ProjectB/pkgX"},
},
},
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
g := new(graphviz).New()
g.createSubgraph(tc.project, tc.pkgs)
// Check the number of created nodes.
if len(g.ps) != len(tc.wantNodes) {
t.Errorf("unexpected number of nodes: \n\t(GOT) %v\n\t(WNT) %v", len(g.ps), len(tc.wantNodes))
}
// Check if the expected nodes are created.
for i, v := range tc.wantNodes {
if v.project != g.ps[i].project {
t.Errorf("found unexpected node: \n\t(GOT) %v\n\t(WNT) %v", g.ps[i].project, v.project)
}
}
// Check the number of created clusters.
if len(g.clusters) != len(tc.wantClusters) {
t.Errorf("unexpected number of clusters: \n\t(GOT) %v\n\t(WNT) %v", len(g.clusters), len(tc.wantClusters))
}
// Check if the expected clusters are created.
if !reflect.DeepEqual(g.clusters, tc.wantClusters) {
t.Errorf("unexpected clusters: \n\t(GOT) %v\n\t(WNT) %v", g.clusters, tc.wantClusters)
}
})
}
}
================================================
FILE: cmd/dep/init.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"context"
"flag"
"log"
"os"
"path/filepath"
"time"
"github.com/golang/dep"
"github.com/golang/dep/gps"
"github.com/golang/dep/internal/fs"
"github.com/pkg/errors"
)
const initShortHelp = `Set up a new Go project, or migrate an existing one`
const initLongHelp = `
Initialize the project at filepath root by parsing its dependencies, writing
manifest and lock files, and vendoring the dependencies. If root isn't
specified, use the current directory.
When configuration for another dependency management tool is detected, it is
imported into the initial manifest and lock. Use the -skip-tools flag to
disable this behavior. The following external tools are supported:
glide, godep, vndr, govend, gb, gvt, govendor, glock.
Any dependencies that are not constrained by external configuration use the
GOPATH analysis below.
By default, the dependencies are resolved over the network. A version will be
selected from the versions available from the upstream source per the following
algorithm:
- Tags conforming to semver (sorted by semver rules)
- Default branch(es) (sorted lexicographically)
- Non-semver tags (sorted lexicographically)
An alternate mode can be activated by passing -gopath. In this mode, the version
of each dependency will reflect the current state of the GOPATH. If a dependency
doesn't exist in the GOPATH, a version will be selected based on the above
network version selection algorithm.
A Gopkg.toml file will be written with inferred version constraints for all
direct dependencies. Gopkg.lock will be written with precise versions, and
vendor/ will be populated with the precise versions written to Gopkg.lock.
`
func (cmd *initCommand) Name() string { return "init" }
func (cmd *initCommand) Args() string { return "[root]" }
func (cmd *initCommand) ShortHelp() string { return initShortHelp }
func (cmd *initCommand) LongHelp() string { return initLongHelp }
func (cmd *initCommand) Hidden() bool { return false }
func (cmd *initCommand) Register(fs *flag.FlagSet) {
fs.BoolVar(&cmd.noExamples, "no-examples", false, "don't include example in Gopkg.toml")
fs.BoolVar(&cmd.skipTools, "skip-tools", false, "skip importing configuration from other dependency managers")
fs.BoolVar(&cmd.gopath, "gopath", false, "search in GOPATH for dependencies")
}
type initCommand struct {
noExamples bool
skipTools bool
gopath bool
}
func (cmd *initCommand) Run(ctx *dep.Ctx, args []string) error {
if len(args) > 1 {
return errors.Errorf("too many args (%d)", len(args))
}
var root string
if len(args) == 0 {
root = ctx.WorkingDir
} else {
root = args[0]
if !filepath.IsAbs(args[0]) {
root = filepath.Join(ctx.WorkingDir, args[0])
}
if err := os.MkdirAll(root, os.FileMode(0777)); err != nil {
return errors.Wrapf(err, "init failed: unable to create a directory at %s", root)
}
}
p, err := cmd.establishProjectAt(root, ctx)
if err != nil {
return err
}
sm, err := ctx.SourceManager()
if err != nil {
return errors.Wrap(err, "init failed: unable to create a source manager")
}
sm.UseDefaultSignalHandling()
defer sm.Release()
if ctx.Verbose {
ctx.Out.Println("Getting direct dependencies...")
}
directDeps, err := p.GetDirectDependencyNames(sm)
if err != nil {
return errors.Wrap(err, "init failed: unable to determine direct dependencies")
}
if ctx.Verbose {
ctx.Out.Printf("Checked %d directories for packages.\nFound %d direct dependencies.\n", len(p.RootPackageTree.Packages), len(directDeps))
}
// Initialize with imported data, then fill in the gaps using the GOPATH
rootAnalyzer := newRootAnalyzer(cmd.skipTools, ctx, directDeps, sm)
p.Manifest, p.Lock, err = rootAnalyzer.InitializeRootManifestAndLock(root, p.ImportRoot)
if err != nil {
return errors.Wrap(err, "init failed: unable to prepare an initial manifest and lock for the solver")
}
// Set default prune options for go-tests and unused-packages
p.Manifest.PruneOptions.DefaultOptions = gps.PruneNestedVendorDirs | gps.PruneGoTestFiles | gps.PruneUnusedPackages
if cmd.gopath {
gs := newGopathScanner(ctx, directDeps, sm)
err = gs.InitializeRootManifestAndLock(p.Manifest, p.Lock)
if err != nil {
return errors.Wrap(err, "init failed: unable to scan the GOPATH for dependencies")
}
}
rootAnalyzer.skipTools = importDuringSolve()
copyLock := *p.Lock // Copy lock before solving. Use this to separate new lock projects from solved lock
params := gps.SolveParameters{
RootDir: root,
RootPackageTree: p.RootPackageTree,
Manifest: p.Manifest,
Lock: p.Lock,
ProjectAnalyzer: rootAnalyzer,
}
if ctx.Verbose {
params.TraceLogger = ctx.Err
}
if err := ctx.ValidateParams(sm, params); err != nil {
return errors.Wrapf(err, "init failed: validation of solve parameters failed")
}
s, err := gps.Prepare(params, sm)
if err != nil {
return errors.Wrap(err, "init failed: unable to prepare the solver")
}
soln, err := s.Solve(context.TODO())
if err != nil {
err = handleAllTheFailuresOfTheWorld(err)
return errors.Wrap(err, "init failed: unable to solve the dependency graph")
}
p.Lock = dep.LockFromSolution(soln, p.Manifest.PruneOptions)
rootAnalyzer.FinalizeRootManifestAndLock(p.Manifest, p.Lock, copyLock)
// Pass timestamp (yyyyMMddHHmmss format) as suffix to backup name.
vendorbak, err := dep.BackupVendor(filepath.Join(root, "vendor"), time.Now().Format("20060102150405"))
if err != nil {
return errors.Wrap(err, "init failed: first backup vendor/, delete it, and then retry the previous command: failed to backup existing vendor directory")
}
if vendorbak != "" {
ctx.Err.Printf("Old vendor backed up to %v", vendorbak)
}
sw, err := dep.NewSafeWriter(p.Manifest, nil, p.Lock, dep.VendorAlways, p.Manifest.PruneOptions, nil)
if err != nil {
return errors.Wrap(err, "init failed: unable to create a SafeWriter")
}
var logger *log.Logger
if ctx.Verbose {
logger = ctx.Err
}
if err := sw.Write(root, sm, !cmd.noExamples, logger); err != nil {
return errors.Wrap(err, "init failed: unable to write the manifest, lock and vendor directory to disk")
}
return nil
}
// establishProjectAt attempts to set up the provided path as the root for the
// project to be created.
//
// It checks for being within a GOPATH, that there is no pre-existing manifest
// and lock, and that we can successfully infer the root import path from
// GOPATH.
//
// If successful, it returns a dep.Project, ready for further use.
func (cmd *initCommand) establishProjectAt(root string, ctx *dep.Ctx) (*dep.Project, error) {
var err error
p := new(dep.Project)
if err = p.SetRoot(root); err != nil {
return nil, errors.Wrapf(err, "init failed: unable to set the root project to %s", root)
}
ctx.GOPATH, err = ctx.DetectProjectGOPATH(p)
if err != nil {
return nil, errors.Wrapf(err, "init failed: unable to detect the containing GOPATH")
}
mf := filepath.Join(root, dep.ManifestName)
lf := filepath.Join(root, dep.LockName)
mok, err := fs.IsRegular(mf)
if err != nil {
return nil, errors.Wrapf(err, "init failed: unable to check for an existing manifest at %s", mf)
}
if mok {
return nil, errors.Errorf("init aborted: manifest already exists at %s", mf)
}
lok, err := fs.IsRegular(lf)
if err != nil {
return nil, errors.Wrapf(err, "init failed: unable to check for an existing lock at %s", lf)
}
if lok {
return nil, errors.Errorf("invalid aborted: lock already exists at %s", lf)
}
ip, err := ctx.ImportForAbs(root)
if err != nil {
return nil, errors.Wrapf(err, "init failed: unable to determine the import path for the root project %s", root)
}
p.ImportRoot = gps.ProjectRoot(ip)
return p, nil
}
================================================
FILE: cmd/dep/integration_test.go
================================================
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"testing"
"github.com/golang/dep"
"github.com/golang/dep/internal/test"
"github.com/golang/dep/internal/test/integration"
)
func TestIntegration(t *testing.T) {
t.Parallel()
test.NeedsExternalNetwork(t)
test.NeedsGit(t)
wd, err := os.Getwd()
if err != nil {
t.Fatal(err)
}
relPath := filepath.Join("testdata", "harness_tests")
filepath.Walk(relPath, func(path string, info os.FileInfo, err error) error {
if err != nil {
t.Fatal("error walking filepath")
}
if filepath.Base(path) != "testcase.json" {
return nil
}
parse := strings.Split(path, string(filepath.Separator))
testName := strings.Join(parse[2:len(parse)-1], "/")
t.Run(testName, func(t *testing.T) {
t.Parallel()
t.Run("external", testIntegration(testName, relPath, wd, execCmd))
t.Run("internal", testIntegration(testName, relPath, wd, runMain))
})
return nil
})
}
func TestDepCachedir(t *testing.T) {
if runtime.GOOS == "windows" {
// This test is unreliable on Windows and fails at random which makes it very
// difficult to debug. It might have something to do with parallel execution.
// Since the test doesn't test any specific behavior of Windows, it should be okay
// to skip.
t.Skip("skipping on windows")
}
t.Parallel()
test.NeedsExternalNetwork(t)
test.NeedsGit(t)
wd, err := os.Getwd()
if err != nil {
t.Fatal(err)
}
initPath := filepath.Join("testdata", "cachedir")
t.Run("env-invalid-cachedir", func(t *testing.T) {
t.Parallel()
testProj := integration.NewTestProject(t, initPath, wd, runMain)
defer testProj.Cleanup()
var d []byte
tmpFp := testProj.Path("tmp-file")
ioutil.WriteFile(tmpFp, d, 0644)
cases := []string{
// invalid path
"\000",
// parent directory does not exist
testProj.Path("non-existent-fldr", "cachedir"),
// path is a regular file
tmpFp,
// invalid path, tmp-file is a regular file
testProj.Path("tmp-file", "cachedir"),
}
wantErr := "dep: $DEPCACHEDIR set to an invalid or inaccessible path"
for _, c := range cases {
testProj.Setenv("DEPCACHEDIR", c)
err = testProj.DoRun([]string{"ensure"})
if err == nil {
// Log the output from running `dep ensure`, could be useful.
t.Logf("test run output: \n%s\n%s", testProj.GetStdout(), testProj.GetStderr())
t.Error("unexpected result: \n\t(GOT) nil\n\t(WNT) exit status 1")
} else if stderr := testProj.GetStderr(); !strings.Contains(stderr, wantErr) {
t.Errorf(
"unexpected error output: \n\t(GOT) %s\n\t(WNT) %s",
strings.TrimSpace(stderr), wantErr,
)
}
}
})
}
// execCmd is a test.RunFunc which runs the program in another process.
func execCmd(prog string, args []string, stdout, stderr io.Writer, dir string, env []string) error {
cmd := exec.Command(prog, args...)
cmd.Stdout = stdout
cmd.Stderr = stderr
cmd.Env = env
cmd.Dir = dir
return cmd.Run()
}
// runMain is a test.RunFunc which runs the program in-process.
func runMain(prog string, args []string, stdout, stderr io.Writer, dir string, env []string) (err error) {
defer func() {
if r := recover(); r != nil {
switch r := r.(type) {
case error:
err = r
default:
err = fmt.Errorf("%v", r)
}
}
}()
m := &Config{
Args: append([]string{prog}, args...),
Stdout: stdout,
Stderr: stderr,
WorkingDir: dir,
Env: env,
}
if exitCode := m.Run(); exitCode != 0 {
err = fmt.Errorf("exit status %d", exitCode)
}
return
}
// testIntegration runs the test specified by <wd>/<relPath>/<name>/testcase.json
func testIntegration(name, relPath, wd string, run integration.RunFunc) func(t *testing.T) {
return func(t *testing.T) {
t.Parallel()
testCase := integration.NewTestCase(t, filepath.Join(wd, relPath), name)
// Skip tests for disabled features
if testCase.RequiredFeatureFlag != "" {
featureEnabled, err := readFeatureFlag(testCase.RequiredFeatureFlag)
if err != nil {
t.Fatal(err)
}
if !featureEnabled {
t.Skipf("skipping %s, %s feature flag not enabled", name, testCase.RequiredFeatureFlag)
}
}
// Set up environment
testProj := integration.NewTestProject(t, testCase.InitialPath(), wd, run)
defer testProj.Cleanup()
// Create and checkout the vendor revisions
for ip, rev := range testCase.VendorInitial {
testProj.GetVendorGit(ip)
testProj.RunGit(testProj.VendorPath(ip), "checkout", rev)
}
// Create and checkout the import revisions
for ip, rev := range testCase.GopathInitial {
testProj.RunGo("get", ip)
testProj.RunGit(testProj.Path("src", ip), "checkout", rev)
}
// Run commands
testProj.RecordImportPaths()
var err error
for i, args := range testCase.Commands {
err = testProj.DoRun(args)
if err != nil && i < len(testCase.Commands)-1 {
t.Fatalf("cmd %s raised an unexpected error: %s", args[0], err.Error())
}
}
if err != nil {
t.Log(err)
}
// Check error raised in final command
testCase.CompareCmdFailure(err != nil)
testCase.CompareError(err, testProj.GetStderr())
if *test.UpdateGolden {
testCase.UpdateOutput(testProj.GetStdout())
} else {
// Check output
testCase.CompareOutput(testProj.GetStdout())
}
// Check vendor paths
testProj.CompareImportPaths()
testCase.CompareVendorPaths(testProj.GetVendorPaths())
if *test.UpdateGolden {
// Update manifest and lock
testCase.UpdateFile(dep.ManifestName, testProj.ProjPath(dep.ManifestName))
testCase.UpdateFile(dep.LockName, testProj.ProjPath(dep.LockName))
} else {
// Check final manifest and lock
testCase.CompareFile(dep.ManifestName, testProj.ProjPath(dep.ManifestName))
testCase.CompareFile(dep.LockName, testProj.ProjPath(dep.LockName))
}
}
}
================================================
FILE: cmd/dep/main.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:generate ./mkdoc.sh
package main
import (
"bytes"
"flag"
"fmt"
"io"
"log"
"os"
"path/filepath"
"runtime"
"runtime/pprof"
"strings"
"text/tabwriter"
"time"
"github.com/golang/dep"
"github.com/golang/dep/internal/fs"
)
var (
successExitCode = 0
errorExitCode = 1
)
type command interface {
Name() string // "foobar"
Args() string // "<baz> [quux...]"
ShortHelp() string // "Foo the first bar"
LongHelp() string // "Foo the first bar meeting the following conditions..."
Register(*flag.FlagSet) // command-specific flags
Hidden() bool // indicates whether the command should be hidden from help output
Run(*dep.Ctx, []string) error
}
// Helper type so that commands can fail without generating any additional
// ouptut.
type silentfail struct{}
func (silentfail) Error() string {
return ""
}
func main() {
p := &profile{}
// Redefining Usage() customizes the output of `dep -h`
flag.CommandLine.Usage = func() {
fprintUsage(os.Stderr)
}
flag.StringVar(&p.cpuProfile, "cpuprofile", "", "Writes a CPU profile to the specified file before exiting.")
flag.StringVar(&p.memProfile, "memprofile", "", "Writes a memory profile to the specified file before exiting.")
flag.IntVar(&p.memProfileRate, "memprofilerate", 0, "Enable more precise memory profiles by setting runtime.MemProfileRate.")
flag.StringVar(&p.mutexProfile, "mutexprofile", "", "Writes a mutex profile to the specified file before exiting.")
flag.IntVar(&p.mutexProfileFraction, "mutexprofilefraction", 0, "Enable more precise mutex profiles by runtime.SetMutexProfileFraction.")
flag.Parse()
wd, err := os.Getwd()
if err != nil {
fmt.Fprintln(os.Stderr, "failed to get working directory", err)
os.Exit(1)
}
args := append([]string{os.Args[0]}, flag.Args()...)
c := &Config{
Args: args,
Stdout: os.Stdout,
Stderr: os.Stderr,
WorkingDir: wd,
Env: os.Environ(),
}
if err := p.start(); err != nil {
fmt.Fprintf(os.Stderr, "failed to profile: %v\n", err)
os.Exit(1)
}
exit := c.Run()
if err := p.finish(); err != nil {
fmt.Fprintf(os.Stderr, "failed to finish the profile: %v\n", err)
os.Exit(1)
}
os.Exit(exit)
}
// A Config specifies a full configuration for a dep execution.
type Config struct {
WorkingDir string // Where to execute
Args []string // Command-line arguments, starting with the program name.
Env []string // Environment variables
Stdout, Stderr io.Writer // Log output
}
// Run executes a configuration and returns an exit code.
func (c *Config) Run() int {
commands := commandList()
cmdName, printCommandHelp, exit := parseArgs(c.Args)
if exit {
fprintUsage(c.Stderr)
return errorExitCode
}
// 'dep help documentation' generates doc.go.
if printCommandHelp && cmdName == "documentation" {
fmt.Println("// Copyright 2017 The Go Authors. All rights reserved.")
fmt.Println("// Use of this source code is governed by a BSD-style")
fmt.Println("// license that can be found in the LICENSE file.")
fmt.Println()
fmt.Println("// DO NOT EDIT THIS FILE. GENERATED BY mkdoc.sh.")
fmt.Println("// Edit the documentation in other files and rerun mkdoc.sh to generate this one.")
fmt.Println()
var cw io.Writer = &commentWriter{W: c.Stdout}
fprintUsage(cw)
for _, cmd := range commands {
if !cmd.Hidden() {
fmt.Fprintln(cw)
short := cmd.ShortHelp()
fmt.Fprintln(cw, short)
fmt.Fprintln(cw)
fmt.Fprintln(cw, "Usage:")
fmt.Fprintln(cw)
fmt.Fprintln(cw, "", cmd.Name(), cmd.Args())
if long := cmd.LongHelp(); long != short {
fmt.Fprintln(cw, long)
}
}
}
fmt.Println("//")
fmt.Println("package main")
return successExitCode
}
outLogger := log.New(c.Stdout, "", 0)
errLogger := log.New(c.Stderr, "", 0)
for _, cmd := range commands {
if cmd.Name() == cmdName {
// Build flag set with global flags in there.
flags := flag.NewFlagSet(cmdName, flag.ContinueOnError)
flags.SetOutput(c.Stderr)
var verbose bool
// No verbose for verify
if cmdName != "check" {
flags.BoolVar(&verbose, "v", false, "enable verbose logging")
}
// Register the subcommand flags in there, too.
cmd.Register(flags)
// Override the usage text to something nicer.
resetUsage(errLogger, flags, cmdName, cmd.Args(), cmd.LongHelp())
if printCommandHelp {
flags.Usage()
return errorExitCode
}
// Parse the flags the user gave us.
// flag package automatically prints usage and error message in err != nil
// or if '-h' flag provided
if err := flags.Parse(c.Args[2:]); err != nil {
return errorExitCode
}
// Cachedir is loaded from env if present. `$GOPATH/pkg/dep` is used as the
// default cache location.
cachedir := getEnv(c.Env, "DEPCACHEDIR")
if cachedir != "" {
if err := fs.EnsureDir(cachedir, 0777); err != nil {
errLogger.Printf(
"dep: $DEPCACHEDIR set to an invalid or inaccessible path: %q\n", cachedir,
)
errLogger.Printf("dep: failed to ensure cache directory: %v\n", err)
return errorExitCode
}
}
var cacheAge time.Duration
if env := getEnv(c.Env, "DEPCACHEAGE"); env != "" {
var err error
cacheAge, err = time.ParseDuration(env)
if err != nil {
errLogger.Printf("dep: failed to parse $DEPCACHEAGE duration %q: %v\n", env, err)
return errorExitCode
}
}
// Set up dep context.
ctx := &dep.Ctx{
Out: outLogger,
Err: errLogger,
Verbose: verbose,
DisableLocking: getEnv(c.Env, "DEPNOLOCK") != "",
Cachedir: cachedir,
CacheAge: cacheAge,
}
GOPATHS := filepath.SplitList(getEnv(c.Env, "GOPATH"))
ctx.SetPaths(c.WorkingDir, GOPATHS...)
// Run the command with the post-flag-processing args.
if err := cmd.Run(ctx, flags.Args()); err != nil {
if _, ok := err.(silentfail); !ok {
errLogger.Printf("%v\n", err)
}
return errorExitCode
}
// Easy peasy livin' breezy.
return successExitCode
}
}
errLogger.Printf("dep: %s: no such command\n", cmdName)
fprintUsage(c.Stderr)
return errorExitCode
}
// Build the list of available commands.
//
// Note that these commands are mutable, but parts of this file
// use them for their immutable characteristics (help strings, etc).
func commandList() []command {
return []command{
&initCommand{},
&statusCommand{},
&ensureCommand{},
&pruneCommand{},
&versionCommand{},
&checkCommand{},
}
}
var examples = [...][2]string{
{
"dep init",
"set up a new project",
},
{
"dep ensure",
"install the project's dependencies",
},
{
"dep ensure -update",
"update the locked versions of all dependencies",
},
{
"dep ensure -add github.com/pkg/errors",
"add a dependency to the project",
},
}
func fprintUsage(w io.Writer) {
fmt.Fprintln(w, "Dep is a tool for managing dependencies for Go projects")
fmt.Fprintln(w)
fmt.Fprintln(w, "Usage: \"dep [command]\"")
fmt.Fprintln(w)
fmt.Fprintln(w, "Commands:")
fmt.Fprintln(w)
tw := tabwriter.NewWriter(w, 0, 0, 2, ' ', 0)
commands := commandList()
for _, cmd := range commands {
if !cmd.Hidden() {
fmt.Fprintf(tw, "\t%s\t%s\n", cmd.Name(), cmd.ShortHelp())
}
}
tw.Flush()
fmt.Fprintln(w)
fmt.Fprintln(w, "Examples:")
for _, example := range examples {
fmt.Fprintf(tw, "\t%s\t%s\n", example[0], example[1])
}
tw.Flush()
fmt.Fprintln(w)
fmt.Fprintln(w, "Use \"dep help [command]\" for more information about a command.")
}
func resetUsage(logger *log.Logger, fs *flag.FlagSet, name, args, longHelp string) {
var (
hasFlags bool
flagBlock bytes.Buffer
flagWriter = tabwriter.NewWriter(&flagBlock, 0, 4, 2, ' ', 0)
)
fs.VisitAll(func(f *flag.Flag) {
hasFlags = true
// Default-empty string vars should read "(default: <none>)"
// rather than the comparatively ugly "(default: )".
defValue := f.DefValue
if defValue == "" {
defValue = "<none>"
}
fmt.Fprintf(flagWriter, "\t-%s\t%s (default: %s)\n", f.Name, f.Usage, defValue)
})
flagWriter.Flush()
fs.Usage = func() {
logger.Printf("Usage: dep %s %s\n", name, args)
logger.Println()
logger.Println(strings.TrimSpace(longHelp))
logger.Println()
if hasFlags {
logger.Println("Flags:")
logger.Println()
logger.Println(flagBlock.String())
}
}
}
// parseArgs determines the name of the dep command and whether the user asked for
// help to be printed.
func parseArgs(args []string) (cmdName string, printCmdUsage bool, exit bool) {
isHelpArg := func() bool {
return strings.Contains(strings.ToLower(args[1]), "help") || strings.ToLower(args[1]) == "-h"
}
switch len(args) {
case 0, 1:
exit = true
case 2:
if isHelpArg() {
exit = true
} else {
cmdName = args[1]
}
default:
if isHelpArg() {
cmdName = args[2]
printCmdUsage = true
} else {
cmdName = args[1]
}
}
return cmdName, printCmdUsage, exit
}
// getEnv returns the last instance of an environment variable.
func getEnv(env []string, key string) string {
for i := len(env) - 1; i >= 0; i-- {
v := env[i]
kv := strings.SplitN(v, "=", 2)
if kv[0] == key {
if len(kv) > 1 {
return kv[1]
}
return ""
}
}
return ""
}
// commentWriter writes a Go comment to the underlying io.Writer,
// using line comment form (//).
//
// Copied from cmd/go/internal/help/help.go.
type commentWriter struct {
W io.Writer
wroteSlashes bool // Wrote "//" at the beginning of the current line.
}
func (c *commentWriter) Write(p []byte) (int, error) {
var n int
for i, b := range p {
if !c.wroteSlashes {
s := "//"
if b != '\n' {
s = "// "
}
if _, err := io.WriteString(c.W, s); err != nil {
return n, err
}
c.wroteSlashes = true
}
n0, err := c.W.Write(p[i : i+1])
n += n0
if err != nil {
return n, err
}
if b == '\n' {
c.wroteSlashes = false
}
}
return len(p), nil
}
type profile struct {
cpuProfile string
memProfile string
memProfileRate int
mutexProfile string
mutexProfileFraction int
// TODO(jbd): Add block profile and -trace.
f *os.File // file to write the profiling output to
}
func (p *profile) start() error {
switch {
case p.cpuProfile != "":
if err := p.createOutput(p.cpuProfile); err != nil {
return err
}
return pprof.StartCPUProfile(p.f)
case p.memProfile != "":
if p.memProfileRate > 0 {
runtime.MemProfileRate = p.memProfileRate
}
return p.createOutput(p.memProfile)
case p.mutexProfile != "":
if p.mutexProfileFraction > 0 {
runtime.SetMutexProfileFraction(p.mutexProfileFraction)
}
return p.createOutput(p.mutexProfile)
}
return nil
}
func (p *profile) finish() error {
if p.f == nil {
return nil
}
switch {
case p.cpuProfile != "":
pprof.StopCPUProfile()
case p.memProfile != "":
if err := pprof.WriteHeapProfile(p.f); err != nil {
return err
}
case p.mutexProfile != "":
if err := pprof.Lookup("mutex").WriteTo(p.f, 2); err != nil {
return err
}
}
return p.f.Close()
}
func (p *profile) createOutput(name string) error {
f, err := os.Create(name)
if err != nil {
return err
}
p.f = f
return nil
}
================================================
FILE: cmd/dep/mkdoc.sh
================================================
#!/bin/bash
# Copyright 2017 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
go build -o dep.latest
./dep.latest help documentation >doc.go
gofmt -w doc.go
rm dep.latest
================================================
FILE: cmd/dep/prune.go
================================================
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"flag"
"io/ioutil"
"log"
"os"
"path/filepath"
"sort"
"strings"
"github.com/golang/dep"
"github.com/golang/dep/gps"
"github.com/golang/dep/gps/pkgtree"
"github.com/golang/dep/internal/fs"
"github.com/pkg/errors"
)
const pruneShortHelp = `Pruning is now performed automatically by dep ensure.`
const pruneLongHelp = `
Prune was merged into the ensure command.
Set prune options in the manifest and it will be applied after every ensure.
dep prune will be removed in a future version of dep, causing this command to exit non-0.
`
type pruneCommand struct {
}
func (cmd *pruneCommand) Name() string { return "prune" }
func (cmd *pruneCommand) Args() string { return "" }
func (cmd *pruneCommand) ShortHelp() string { return pruneShortHelp }
func (cmd *pruneCommand) LongHelp() string { return pruneLongHelp }
func (cmd *pruneCommand) Hidden() bool { return true }
func (cmd *pruneCommand) Register(fs *flag.FlagSet) {
}
func (cmd *pruneCommand) Run(ctx *dep.Ctx, args []string) error {
ctx.Err.Printf("Pruning is now performed automatically by dep ensure.\n")
ctx.Err.Printf("Set prune settings in %s and it will be applied when running ensure.\n", dep.ManifestName)
ctx.Err.Printf("\nThis command currently still prunes as it always has, to ease the transition.\n")
ctx.Err.Printf("However, it will be removed in a future version of dep.\n")
ctx.Err.Printf("\nNow is the time to update your Gopkg.toml and remove `dep prune` from any scripts.\n")
ctx.Err.Printf("\nFor more information, see: https://golang.github.io/dep/docs/Gopkg.toml.html#prune\n")
p, err := ctx.LoadProject()
if err != nil {
return err
}
sm, err := ctx.SourceManager()
if err != nil {
return err
}
sm.UseDefaultSignalHandling()
defer sm.Release()
// While the network churns on ListVersions() requests, statically analyze
// code from the current project.
ptree, err := pkgtree.ListPackages(p.ResolvedAbsRoot, string(p.ImportRoot))
if err != nil {
return errors.Wrap(err, "analysis of local packages failed: %v")
}
// Set up a solver in order to check the InputHash.
params := p.MakeParams()
params.RootPackageTree = ptree
if ctx.Verbose {
params.TraceLogger = ctx.Err
}
if p.Lock == nil {
return errors.Errorf("Gopkg.lock must exist for prune to know what files are safe to remove.")
}
pruneLogger := ctx.Err
if !ctx.Verbose {
pruneLogger = log.New(ioutil.Discard, "", 0)
}
return pruneProject(p, sm, pruneLogger)
}
// pruneProject removes unused packages from a project.
func pruneProject(p *dep.Project, sm gps.SourceManager, logger *log.Logger) error {
td, err := ioutil.TempDir(os.TempDir(), "dep")
if err != nil {
return errors.Wrap(err, "error while creating temp dir for writing manifest/lock/vendor")
}
defer os.RemoveAll(td)
onWrite := func(progress gps.WriteProgress) {
logger.Println(progress)
}
if err := gps.WriteDepTree(td, p.Lock, sm, gps.CascadingPruneOptions{DefaultOptions: gps.PruneNestedVendorDirs}, onWrite); err != nil {
return err
}
var toKeep []string
for _, project := range p.Lock.Projects() {
projectRoot := string(project.Ident().ProjectRoot)
for _, pkg := range project.Packages() {
toKeep = append(toKeep, filepath.Join(projectRoot, pkg))
}
}
toDelete, err := calculatePrune(td, toKeep, logger)
if err != nil {
return err
}
if len(toDelete) > 0 {
logger.Println("Calculated the following directories to prune:")
for _, d := range toDelete {
logger.Printf(" %s\n", d)
}
} else {
logger.Println("No directories found to prune")
}
if err := deleteDirs(toDelete); err != nil {
return err
}
vpath := filepath.Join(p.AbsRoot, "vendor")
vendorbak := vpath + ".orig"
var failerr error
if _, err := os.Stat(vpath); err == nil {
// Move out the old vendor dir. just do it into an adjacent dir, to
// try to mitigate the possibility of a pointless cross-filesystem
// move with a temp directory.
if _, err := os.Stat(vendorbak); err == nil {
// If the adjacent dir already exists, bite the bullet and move
// to a proper tempdir.
vendorbak = filepath.Join(td, "vendor.orig")
}
failerr = fs.RenameWithFallback(vpath, vendorbak)
if failerr != nil {
goto fail
}
}
// Move in the new one.
failerr = fs.RenameWithFallback(td, vpath)
if failerr != nil {
goto fail
}
os.RemoveAll(vendorbak)
return nil
fail:
fs.RenameWithFallback(vendorbak, vpath)
return failerr
}
func calculatePrune(vendorDir string, keep []string, logger *log.Logger) ([]string, error) {
logger.Println("Calculating prune. Checking the following packages:")
sort.Strings(keep)
var toDelete []string
err := filepath.Walk(vendorDir, func(path string, info os.FileInfo, err error) error {
if _, err := os.Lstat(path); err != nil {
return nil
}
if !info.IsDir() {
return nil
}
if path == vendorDir {
return nil
}
name := strings.TrimPrefix(path, vendorDir+string(filepath.Separator))
logger.Printf(" %s", name)
i := sort.Search(len(keep), func(i int) bool {
return name <= keep[i]
})
if i >= len(keep) || !strings.HasPrefix(keep[i], name) {
toDelete = append(toDelete, path)
}
return nil
})
return toDelete, err
}
func deleteDirs(toDelete []string) error {
// sort by length so we delete sub dirs first
sort.Sort(byLen(toDelete))
for _, path := range toDelete {
if err := os.RemoveAll(path); err != nil {
return err
}
}
return nil
}
type byLen []string
func (a byLen) Len() int { return len(a) }
func (a byLen) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a byLen) Less(i, j int) bool { return len(a[i]) > len(a[j]) }
================================================
FILE: cmd/dep/root_analyzer.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"context"
"io/ioutil"
"log"
"github.com/golang/dep"
"github.com/golang/dep/gps"
fb "github.com/golang/dep/internal/feedback"
"github.com/golang/dep/internal/importers"
"golang.org/x/sync/errgroup"
)
// rootAnalyzer supplies manifest/lock data from both dep and external tool's
// configuration files.
// * When used on the root project, it imports only from external tools.
// * When used by the solver for dependencies, it first looks for dep config,
// then external tools.
type rootAnalyzer struct {
skipTools bool
ctx *dep.Ctx
sm gps.SourceManager
directDeps map[gps.ProjectRoot]bool
}
func newRootAnalyzer(skipTools bool, ctx *dep.Ctx, directDeps map[gps.ProjectRoot]bool, sm gps.SourceManager) *rootAnalyzer {
return &rootAnalyzer{
skipTools: skipTools,
ctx: ctx,
sm: sm,
directDeps: directDeps,
}
}
func (a *rootAnalyzer) InitializeRootManifestAndLock(dir string, pr gps.ProjectRoot) (rootM *dep.Manifest, rootL *dep.Lock, err error) {
if !a.skipTools {
rootM, rootL = a.importManifestAndLock(dir, pr, false)
}
if rootM == nil {
rootM = dep.NewManifest()
// Since we didn't find anything to import, dep's cache is empty.
// We are prefetching dependencies and logging so that the subsequent solve step
// doesn't spend a long time retrieving dependencies without feedback for the user.
if err := a.cacheDeps(pr); err != nil {
return nil, nil, err
}
}
if rootL == nil {
rootL = &dep.Lock{}
}
return
}
func (a *rootAnalyzer) cacheDeps(pr gps.ProjectRoot) error {
logger := a.ctx.Err
g, _ := errgroup.WithContext(context.TODO())
concurrency := 4
syncDep := func(pr gps.ProjectRoot, sm gps.SourceManager) error {
if err := sm.SyncSourceFor(gps.ProjectIdentifier{ProjectRoot: pr}); err != nil {
logger.Printf("Unable to cache %s - %s", pr, err)
return err
}
return nil
}
deps := make(chan gps.ProjectRoot)
for i := 0; i < concurrency; i++ {
g.Go(func() error {
for d := range deps {
err := syncDep(gps.ProjectRoot(d), a.sm)
if err != nil {
return err
}
}
return nil
})
}
g.Go(func() error {
defer close(deps)
for pr := range a.directDeps {
logger.Printf("Caching package %q", pr)
deps <- pr
}
return nil
})
if err := g.Wait(); err != nil {
return err
}
logger.Printf("Successfully cached all deps.")
return nil
}
func (a *rootAnalyzer) importManifestAndLock(dir string, pr gps.ProjectRoot, suppressLogs bool) (*dep.Manifest, *dep.Lock) {
logger := a.ctx.Err
if suppressLogs {
logger = log.New(ioutil.Discard, "", 0)
}
for _, i := range importers.BuildAll(logger, a.ctx.Verbose, a.sm) {
if i.HasDepMetadata(dir) {
a.ctx.Err.Printf("Importing configuration from %s. These are only initial constraints, and are further refined during the solve process.", i.Name())
m, l, err := i.Import(dir, pr)
if err != nil {
a.ctx.Err.Printf(
"Warning: Encountered an unrecoverable error while trying to import %s config from %q: %s",
i.Name(), dir, err,
)
break
}
a.removeTransitiveDependencies(m)
return m, l
}
}
var emptyManifest = dep.NewManifest()
return emptyManifest, nil
}
func (a *rootAnalyzer) removeTransitiveDependencies(m *dep.Manifest) {
for pr := range m.Constraints {
if _, isDirect := a.directDeps[pr]; !isDirect {
delete(m.Constraints, pr)
}
}
}
// DeriveManifestAndLock evaluates a dependency for existing dependency manager
// configuration (ours or external) and passes any configuration found back
// to the solver.
func (a *rootAnalyzer) DeriveManifestAndLock(dir string, pr gps.ProjectRoot) (gps.Manifest, gps.Lock, error) {
// Ignore other tools if we find dep configuration
var depAnalyzer dep.Analyzer
if depAnalyzer.HasDepMetadata(dir) {
return depAnalyzer.DeriveManifestAndLock(dir, pr)
}
if !a.skipTools {
// The assignment back to an interface prevents interface-based nil checks from failing later
var manifest gps.Manifest = gps.SimpleManifest{}
var lock gps.Lock
im, il := a.importManifestAndLock(dir, pr, true)
if im != nil {
manifest = im
}
if il != nil {
lock = il
}
return manifest, lock, nil
}
return gps.SimpleManifest{}, nil, nil
}
func (a *rootAnalyzer) FinalizeRootManifestAndLock(m *dep.Manifest, l *dep.Lock, ol dep.Lock) {
// Iterate through the new projects in solved lock and add them to manifest
// if they are direct deps and log feedback for all the new projects.
diff := fb.DiffLocks(&ol, l)
bi := fb.NewBrokenImportFeedback(diff)
bi.LogFeedback(a.ctx.Err)
for _, y := range l.Projects() {
var f *fb.ConstraintFeedback
pr := y.Ident().ProjectRoot
// New constraints: in new lock and dir dep but not in manifest
if _, ok := a.directDeps[pr]; ok {
if _, ok := m.Constraints[pr]; !ok {
pp := getProjectPropertiesFromVersion(y.Version())
if pp.Constraint != nil {
m.Constraints[pr] = pp
pc := gps.ProjectConstraint{Ident: y.Ident(), Constraint: pp.Constraint}
f = fb.NewConstraintFeedback(pc, fb.DepTypeDirect)
f.LogFeedback(a.ctx.Err)
}
f = fb.NewLockedProjectFeedback(y, fb.DepTypeDirect)
f.LogFeedback(a.ctx.Err)
}
} else {
// New locked projects: in new lock but not in old lock
newProject := true
for _, opl := range ol.Projects() {
if pr == opl.Ident().ProjectRoot {
newProject = false
}
}
if newProject {
f = fb.NewLockedProjectFeedback(y, fb.DepTypeTransitive)
f.LogFeedback(a.ctx.Err)
}
}
}
}
// Info provides metadata on the analyzer algorithm used during solve.
func (a *rootAnalyzer) Info() gps.ProjectAnalyzerInfo {
return gps.ProjectAnalyzerInfo{
Name: "dep",
Version: 1,
}
}
================================================
FILE: cmd/dep/status.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"context"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"sort"
"strings"
"sync"
"text/tabwriter"
"text/template"
"github.com/golang/dep"
"github.com/golang/dep/gps"
"github.com/golang/dep/gps/paths"
"github.com/golang/dep/gps/verify"
"github.com/pkg/errors"
)
const availableTemplateVariables = "ProjectRoot, Constraint, Version, Revision, Latest, and PackageCount."
const availableDefaultTemplateVariables = `.Projects[]{
.ProjectRoot,.Source,.Constraint,.PackageCount,.Packages[],
.PruneOpts,.Digest,.Locked{.Branch,.Revision,.Version},
.Latest{.Revision,.Version}
},
.Metadata{
.AnalyzerName,.AnalyzerVersion,.InputImports,.SolverName,
.SolverVersion
}`
const statusShortHelp = `Report the status of the project's dependencies`
const statusLongHelp = `
With no arguments, print the status of each dependency of the project.
PROJECT Import path
CONSTRAINT Version constraint, from the manifest
VERSION Version chosen, from the lock
REVISION VCS revision of the chosen version
LATEST Latest VCS revision available
PKGS USED Number of packages from this project that are actually used
You may use the -f flag to create a custom format for the output of the
dep status command. The available fields you can utilize are as follows:
` + availableTemplateVariables + `
Status returns exit code zero if all dependencies are in a "good state".
`
const statusExamples = `
dep status
Displays a table of the various dependencies in the project along with
their properties such as the constraints they are bound by and the
revision they are at.
dep status -detail
Displays a detailed table of the dependencies in the project including
the value of any source rules used and full list of packages used from
each project (instead of simply a count). Text wrapping may make this
output hard to read.
dep status -f='{{if eq .Constraint "master"}}{{.ProjectRoot}} {{end}}'
Displays the list of package names constrained on the master branch.
The -f flag allows you to use Go templates along with it's various
constructs for formatting output data. Available flags are as follows:
` + availableTemplateVariables + `
dep status -detail -f='{{range $i, $p := .Projects}}{{if ne .Source "" -}}
{{- if $i}},{{end}}{{$p.ProjectRoot}}:{{$p.Source}}{{end}}{{end}}'
Displays the package name and source for each package with a source
rule defined, with a comma between each name-source pair.
When used with -detail, the -f flag applies the supplied Go templates
to the full output document, instead of to packages one at a time.
Available flags are as follows: ` + availableDefaultTemplateVariables + `
dep status -json
Displays the dependency information in JSON format as a list of
project objects. Each project object contains keys which correspond
to the table column names from the standard 'dep status' command.
Linux: dep status -dot | dot -T png | display
MacOS: dep status -dot | dot -T png | open -f -a /Applications/Preview.app
Windows: dep status -dot | dot -T png -o status.png; start status.png
Generates a visual representation of the dependency tree using GraphViz.
(Note: in order for this example to work you must first have graphviz
installed on your system)
`
const (
shortRev uint8 = iota
longRev
)
var (
errFailedUpdate = errors.New("failed to fetch updates")
errFailedListPkg = errors.New("failed to list packages")
errMultipleFailures = errors.New("multiple sources of failure")
errInputDigestMismatch = errors.New("input-digest mismatch")
)
func (cmd *statusCommand) Name() string { return "status" }
func (cmd *statusCommand) Args() string { return "[package...]" }
func (cmd *statusCommand) ShortHelp() string { return statusShortHelp }
func (cmd *statusCommand) LongHelp() string { return statusLongHelp }
func (cmd *statusCommand) Hidden() bool { return false }
func (cmd *statusCommand) Register(fs *flag.FlagSet) {
fs.BoolVar(&cmd.examples, "examples", false, "print detailed usage examples")
fs.BoolVar(&cmd.json, "json", false, "output in JSON format")
fs.StringVar(&cmd.template, "f", "", "output in text/template format")
fs.BoolVar(&cmd.lock, "lock", false, "output in the lock file format (assumes -detail)")
fs.BoolVar(&cmd.dot, "dot", false, "output the dependency graph in GraphViz format")
fs.BoolVar(&cmd.old, "old", false, "only show out-of-date dependencies")
fs.BoolVar(&cmd.missing, "missing", false, "only show missing dependencies")
fs.StringVar(&cmd.outFilePath, "out", "", "path to a file to which to write the output. Blank value will be ignored")
fs.BoolVar(&cmd.detail, "detail", false, "include more detail in the chosen format")
}
type statusCommand struct {
examples bool
json bool
template string
lock bool
output string
dot bool
old bool
missing bool
outFilePath string
detail bool
}
type outputter interface {
BasicHeader() error
BasicLine(*BasicStatus) error
BasicFooter() error
DetailHeader(*dep.SolveMeta) error
DetailLine(*DetailStatus) error
DetailFooter(*dep.SolveMeta) error
MissingHeader() error
MissingLine(*MissingStatus) error
MissingFooter() error
}
// Only a subset of the outputters should be able to output old statuses.
type oldOutputter interface {
OldHeader() error
OldLine(*OldStatus) error
OldFooter() error
}
type tableOutput struct{ w *tabwriter.Writer }
func (out *tableOutput) BasicHeader() error {
_, err := fmt.Fprintf(out.w, "PROJECT\tCONSTRAINT\tVERSION\tREVISION\tLATEST\tPKGS USED\n")
return err
}
func (out *tableOutput) BasicFooter() error {
return out.w.Flush()
}
func (out *tableOutput) BasicLine(bs *BasicStatus) error {
_, err := fmt.Fprintf(out.w,
"%s\t%s\t%s\t%s\t%s\t%d\t\n",
bs.ProjectRoot,
bs.getConsolidatedConstraint(),
formatVersion(bs.Version),
formatVersion(bs.Revision),
bs.getConsolidatedLatest(shortRev),
bs.PackageCount,
)
return err
}
func (out *tableOutput) DetailHeader(metadata *dep.SolveMeta) error {
_, err := fmt.Fprintf(out.w, "PROJECT\tSOURCE\tCONSTRAINT\tVERSION\tREVISION\tLATEST\tPKGS USED\n")
return err
}
func (out *tableOutput) DetailFooter(metadata *dep.SolveMeta) error {
return out.BasicFooter()
}
func (out *tableOutput) DetailLine(ds *DetailStatus) error {
_, err := fmt.Fprintf(out.w,
"%s\t%s\t%s\t%s\t%s\t%s\t[%s]\t\n",
ds.ProjectRoot,
ds.Source,
ds.getConsolidatedConstraint(),
formatVersion(ds.Version),
formatVersion(ds.Revision),
ds.getConsolidatedLatest(shortRev),
strings.Join(ds.Packages, ", "),
)
return err
}
func (out *tableOutput) MissingHeader() error {
_, err := fmt.Fprintln(out.w, "PROJECT\tMISSING PACKAGES")
return err
}
func (out *tableOutput) MissingLine(ms *MissingStatus) error {
_, err := fmt.Fprintf(out.w,
"%s\t%s\t\n",
ms.ProjectRoot,
ms.MissingPackages,
)
return err
}
func (out *tableOutput) MissingFooter() error {
return out.w.Flush()
}
func (out *tableOutput) OldHeader() error {
_, err := fmt.Fprintf(out.w, "PROJECT\tCONSTRAINT\tREVISION\tLATEST\n")
return err
}
func (out *tableOutput) OldLine(os *OldStatus) error {
_, err := fmt.Fprintf(out.w,
"%s\t%s\t%s\t%s\t\n",
os.ProjectRoot,
os.getConsolidatedConstraint(),
formatVersion(os.Revision),
os.getConsolidatedLatest(shortRev),
)
return err
}
func (out *tableOutput) OldFooter() error {
return out.w.Flush()
}
type jsonOutput struct {
w io.Writer
basic []*rawStatus
detail []rawDetailProject
missing []*MissingStatus
old []*rawOldStatus
}
func (out *jsonOutput) BasicHeader() error {
out.basic = []*rawStatus{}
return nil
}
func (out *jsonOutput) BasicFooter() error {
return json.NewEncoder(out.w).Encode(out.basic)
}
func (out *jsonOutput) BasicLine(bs *BasicStatus) error {
out.basic = append(out.basic, bs.marshalJSON())
return nil
}
func (out *jsonOutput) DetailHeader(metadata *dep.SolveMeta) error {
out.detail = []rawDetailProject{}
return nil
}
func (out *jsonOutput) DetailFooter(metadata *dep.SolveMeta) error {
doc := rawDetail{
Projects: out.detail,
Metadata: newRawMetadata(metadata),
}
return json.NewEncoder(out.w).Encode(doc)
}
func (out *jsonOutput) DetailLine(ds *DetailStatus) error {
out.detail = append(out.detail, *ds.marshalJSON())
return nil
}
func (out *jsonOutput) MissingHeader() error {
out.missing = []*MissingStatus{}
return nil
}
func (out *jsonOutput) MissingLine(ms *MissingStatus) error {
out.missing = append(out.missing, ms)
return nil
}
func (out *jsonOutput) MissingFooter() error {
return json.NewEncoder(out.w).Encode(out.missing)
}
func (out *jsonOutput) OldHeader() error {
out.old = []*rawOldStatus{}
return nil
}
func (out *jsonOutput) OldLine(os *OldStatus) error {
out.old = append(out.old, os.marshalJSON())
return nil
}
func (out *jsonOutput) OldFooter() error {
return json.NewEncoder(out.w).Encode(out.old)
}
type dotOutput struct {
w io.Writer
o string
g *graphviz
p *dep.Project
}
func (out *dotOutput) BasicHeader() error {
out.g = new(graphviz).New()
ptree := out.p.RootPackageTree
// TODO(sdboyer) should be true, true, false, out.p.Manifest.IgnoredPackages()
prm, _ := ptree.ToReachMap(true, false, false, nil)
out.g.createNode(string(out.p.ImportRoot), "", prm.FlattenFn(paths.IsStandardImportPath))
return nil
}
func (out *dotOutput) BasicFooter() error {
gvo := out.g.output("")
_, err := fmt.Fprint(out.w, gvo.String())
return err
}
func (out *dotOutput) BasicLine(bs *BasicStatus) error {
out.g.createNode(bs.ProjectRoot, bs.getConsolidatedVersion(), bs.Children)
return nil
}
func (out *dotOutput) DetailHeader(metadata *dep.SolveMeta) error {
return out.BasicHeader()
}
func (out *dotOutput) DetailFooter(metadata *dep.SolveMeta) error {
return out.BasicFooter()
}
func (out *dotOutput) DetailLine(ds *DetailStatus) error {
return out.BasicLine(&ds.BasicStatus)
}
func (out *dotOutput) MissingHeader() error { return nil }
func (out *dotOutput) MissingLine(ms *MissingStatus) error { return nil }
func (out *dotOutput) MissingFooter() error { return nil }
type templateOutput struct {
w io.Writer
tmpl *template.Template
detail []rawDetailProject
}
func (out *templateOutput) BasicHeader() error { return nil }
func (out *templateOutput) BasicFooter() error { return nil }
func (out *templateOutput) BasicLine(bs *BasicStatus) error {
data := rawStatus{
ProjectRoot: bs.ProjectRoot,
Constraint: bs.getConsolidatedConstraint(),
Version: bs.getConsolidatedVersion(),
Revision: bs.Revision.String(),
Latest: bs.getConsolidatedLatest(shortRev),
PackageCount: bs.PackageCount,
}
return out.tmpl.Execute(out.w, data)
}
func (out *templateOutput) DetailHeader(metadata *dep.SolveMeta) error {
out.detail = []rawDetailProject{}
return nil
}
func (out *templateOutput) DetailFooter(metadata *dep.SolveMeta) error {
raw := rawDetail{
Projects: out.detail,
Metadata: newRawMetadata(metadata),
}
return out.tmpl.Execute(out.w, raw)
}
func (out *templateOutput) DetailLine(ds *DetailStatus) error {
data := rawDetailProject{
ProjectRoot: ds.ProjectRoot,
Constraint: ds.getConsolidatedConstraint(),
Locked: formatDetailVersion(ds.Version, ds.Revision),
Latest: formatDetailLatestVersion(ds.Latest, ds.hasError),
PruneOpts: ds.getPruneOpts(),
Digest: ds.Digest.String(),
PackageCount: ds.PackageCount,
Source: ds.Source,
Packages: ds.Packages,
}
out.detail = append(out.detail, data)
return nil
}
func (out *templateOutput) OldHeader() error { return nil }
func (out *templateOutput) OldFooter() error { return nil }
func (out *templateOutput) OldLine(os *OldStatus) error {
return out.tmpl.Execute(out.w, os)
}
func (out *templateOutput) MissingHeader() error { return nil }
func (out *templateOutput) MissingFooter() error { return nil }
func (out *templateOutput) MissingLine(ms *MissingStatus) error {
return out.tmpl.Execute(out.w, ms)
}
func (cmd *statusCommand) Run(ctx *dep.Ctx, args []string) error {
if cmd.examples {
ctx.Err.Println(strings.TrimSpace(statusExamples))
return nil
}
if err := cmd.validateFlags(); err != nil {
return err
}
p, err := ctx.LoadProject()
if err != nil {
return err
}
sm, err := ctx.SourceManager()
if err != nil {
return err
}
sm.UseDefaultSignalHandling()
defer sm.Release()
if err := dep.ValidateProjectRoots(ctx, p.Manifest, sm); err != nil {
return err
}
var buf bytes.Buffer
var out outputter
switch {
case cmd.missing:
return errors.Errorf("not implemented")
case cmd.json:
out = &jsonOutput{
w: &buf,
}
case cmd.dot:
out = &dotOutput{
p: p,
o: cmd.output,
w: &buf,
}
case cmd.template != "":
tmpl, err := parseStatusTemplate(cmd.template)
if err != nil {
return err
}
out = &templateOutput{
w: &buf,
tmpl: tmpl,
}
case cmd.lock:
tmpl, err := parseStatusTemplate(statusLockTemplate)
if err != nil {
return err
}
out = &templateOutput{
w: &buf,
tmpl: tmpl,
}
default:
out = &tableOutput{
w: tabwriter.NewWriter(&buf, 0, 4, 2, ' ', 0),
}
}
// Check if the lock file exists.
if p.Lock == nil {
return errors.Errorf("no Gopkg.lock found. Run `dep ensure` to generate lock file")
}
if cmd.old {
if _, ok := out.(oldOutputter); !ok {
return errors.Errorf("invalid output format used")
}
err = cmd.runOld(ctx, out.(oldOutputter), p, sm)
ctx.Out.Print(buf.String())
return err
}
_, errCount, runerr := cmd.runStatusAll(ctx, out, p, sm)
if runerr != nil {
switch runerr {
case errFailedUpdate:
// Print the help when in non-verbose mode
if !ctx.Verbose {
ctx.Out.Printf("The status of %d projects are unknown due to errors. Rerun with `-v` flag to see details.\n", errCount)
}
case errInputDigestMismatch:
ctx.Err.Printf("Gopkg.lock is out of sync with imports and/or Gopkg.toml. Run `dep check` for details.\n")
default:
return runerr
}
}
if cmd.outFilePath == "" {
// Print the status output
ctx.Out.Print(buf.String())
} else {
file, err := os.Create(cmd.outFilePath)
if err != nil {
return fmt.Errorf("error creating output file: %v", err)
}
defer file.Close()
if _, err := io.Copy(file, bytes.NewReader(buf.Bytes())); err != nil {
return fmt.Errorf("error writing output file: %v", err)
}
}
return runerr
}
func (cmd *statusCommand) validateFlags() error {
// Operating mode flags.
var opModes []string
if cmd.old {
opModes = append(opModes, "-old")
}
if cmd.missing {
opModes = append(opModes, "-missing")
}
if cmd.detail {
opModes = append(opModes, "-detail")
}
// Check if any other flags are passed with -dot.
if cmd.dot {
if cmd.template != "" {
return errors.New("cannot pass template string with -dot")
}
if cmd.json {
return errors.New("cannot pass multiple output format flags")
}
if len(opModes) > 0 {
return errors.New("-dot generates dependency graph; cannot pass other flags")
}
}
if cmd.lock {
if cmd.template != "" {
return errors.New("cannot pass template string with -lock")
}
if !cmd.detail {
cmd.detail = true
}
}
if len(opModes) > 1 {
// List the flags because which flags are for operation mode might not
// be apparent to the users.
return errors.Wrapf(errors.New("cannot pass multiple operating mode flags"), "%v", opModes)
}
return nil
}
// OldStatus contains information about all the out of date packages in a project.
type OldStatus struct {
ProjectRoot string
Constraint gps.Constraint
Revision gps.Revision
Latest gps.Version
}
type rawOldStatus struct {
ProjectRoot, Constraint, Revision, Latest string
}
func (os OldStatus) getConsolidatedConstraint() string {
var constraint string
if os.Constraint != nil {
if v, ok := os.Constraint.(gps.Version); ok {
constraint = formatVersion(v)
} else {
constraint = os.Constraint.String()
}
}
return constraint
}
func (os OldStatus) getConsolidatedLatest(revSize uint8) string {
latest := ""
if os.Latest != nil {
switch revSize {
case shortRev:
latest = formatVersion(os.Latest)
case longRev:
latest = os.Latest.String()
}
}
return latest
}
func (os OldStatus) marshalJSON() *rawOldStatus {
return &rawOldStatus{
ProjectRoot: os.ProjectRoot,
Constraint: os.getConsolidatedConstraint(),
Revision: string(os.Revision),
Latest: os.getConsolidatedLatest(longRev),
}
}
func (cmd *statusCommand) runOld(ctx *dep.Ctx, out oldOutputter, p *dep.Project, sm gps.SourceManager) error {
// While the network churns on ListVersions() requests, statically analyze
// code from the current project.
ptree := p.RootPackageTree
// Set up a solver in order to check the InputHash.
params := gps.SolveParameters{
ProjectAnalyzer: dep.Analyzer{},
RootDir: p.AbsRoot,
RootPackageTree: ptree,
Manifest: p.Manifest,
// Locks aren't a part of the input hash check, so we can omit it.
}
logger := ctx.Err
if ctx.Verbose {
params.TraceLogger = ctx.Err
} else {
logger = log.New(ioutil.Discard, "", 0)
}
// Check update for all the projects.
params.ChangeAll = true
solver, err := gps.Prepare(params, sm)
if err != nil {
return errors.Wrap(err, "fastpath solver prepare")
}
logger.Println("Solving dependency graph to determine which dependencies can be updated.")
solution, err := solver.Solve(context.TODO())
if err != nil {
return errors.Wrap(err, "runOld")
}
var oldStatuses []OldStatus
solutionProjects := solution.Projects()
for _, proj := range p.Lock.Projects() {
for _, sProj := range solutionProjects {
// Look for the same project in solution and lock.
if sProj.Ident().ProjectRoot != proj.Ident().ProjectRoot {
continue
}
// If revisions are not the same then it is old and we should display it.
latestRev, _, _ := gps.VersionComponentStrings(sProj.Version())
atRev, _, _ := gps.VersionComponentStrings(proj.Version())
if atRev == latestRev {
continue
}
var constraint gps.Constraint
// Getting Constraint.
if pp, has := p.Manifest.Ovr[proj.Ident().ProjectRoot]; has && pp.Constraint != nil {
// manifest has override for project.
constraint = pp.Constraint
} else if pp, has := p.Manifest.Constraints[proj.Ident().ProjectRoot]; has && pp.Constraint != nil {
// manifest has normal constraint.
constraint = pp.Constraint
} else {
// No constraint exists. No need to worry about displaying it.
continue
}
// Generate the old status data and append it.
os := OldStatus{
ProjectRoot: proj.Ident().String(),
Revision: gps.Revision(atRev),
Latest: gps.Revision(latestRev),
Constraint: constraint,
}
oldStatuses = append(oldStatuses, os)
}
}
out.OldHeader()
for _, ostat := range oldStatuses {
out.OldLine(&ostat)
}
out.OldFooter()
return nil
}
type rawStatus struct {
ProjectRoot string
Constraint string
Version string
Revision string
Latest string
PackageCount int
}
// rawDetail is is additional information used for the status when the
// -detail flag is specified
type rawDetail struct {
Projects []rawDetailProject
Metadata rawDetailMetadata
}
type rawDetailVersion struct {
Revision string `json:"Revision,omitempty"`
Version string `json:"Version,omitempty"`
Branch string `json:"Branch,omitempty"`
}
type rawDetailProject struct {
ProjectRoot string
Packages []string
Locked rawDetailVersion
Latest rawDetailVersion
PruneOpts string
Digest string
Source string `json:"Source,omitempty"`
Constraint string
PackageCount int
}
type rawDetailMetadata struct {
AnalyzerName string
AnalyzerVersion int
InputsDigest string // deprecated
InputImports []string
SolverName string
SolverVersion int
}
func newRawMetadata(metadata *dep.SolveMeta) rawDetailMetadata {
if metadata == nil {
return rawDetailMetadata{}
}
return rawDetailMetadata{
AnalyzerName: metadata.AnalyzerName,
AnalyzerVersion: metadata.AnalyzerVersion,
InputImports: metadata.InputImports,
SolverName: metadata.SolverName,
SolverVersion: metadata.SolverVersion,
}
}
// BasicStatus contains all the information reported about a single dependency
// in the summary/list status output mode.
type BasicStatus struct {
ProjectRoot string
Children []string
Constraint gps.Constraint
Version gps.UnpairedVersion
Revision gps.Revision
Latest gps.Version
PackageCount int
hasOverride bool
hasError bool
}
// DetailStatus contains all information reported about a single dependency
// in the detailed status output mode. The included information matches the
// information included about a a project in a lock file.
type DetailStatus struct {
BasicStatus
Packages []string
Source string
PruneOpts gps.PruneOptions
Digest verify.VersionedDigest
}
func (bs *BasicStatus) getConsolidatedConstraint() string {
var constraint string
if bs.Constraint != nil {
if v, ok := bs.Constraint.(gps.Version); ok {
constraint = formatVersion(v)
} else {
constraint = bs.Constraint.String()
}
}
if bs.hasOverride {
constraint += " (override)"
}
return constraint
}
func (bs *BasicStatus) getConsolidatedVersion() string {
version := formatVersion(bs.Revision)
if bs.Version != nil {
version = formatVersion(bs.Version)
}
return version
}
func (bs *BasicStatus) getConsolidatedLatest(revSize uint8) string {
latest := ""
if bs.Latest != nil {
switch revSize {
case shortRev:
latest = formatVersion(bs.Latest)
case longRev:
latest = bs.Latest.String()
}
}
if bs.hasError {
latest += "unknown"
}
return latest
}
func (ds *DetailStatus) getPruneOpts() string {
return (ds.PruneOpts & ^gps.PruneNestedVendorDirs).String()
}
func (bs *BasicStatus) marshalJSON() *rawStatus {
return &rawStatus{
ProjectRoot: bs.ProjectRoot,
Constraint: bs.getConsolidatedConstraint(),
Version: formatVersion(bs.Version),
Revision: string(bs.Revision),
Latest: bs.getConsolidatedLatest(longRev),
PackageCount: bs.PackageCount,
}
}
func (ds *DetailStatus) marshalJSON() *rawDetailProject {
rawStatus := ds.BasicStatus.marshalJSON()
return &rawDetailProject{
ProjectRoot: rawStatus.ProjectRoot,
Constraint: rawStatus.Constraint,
Locked: formatDetailVersion(ds.Version, ds.Revision),
Latest: formatDetailLatestVersion(ds.Latest, ds.hasError),
PruneOpts: ds.getPruneOpts(),
Digest: ds.Digest.String(),
Source: ds.Source,
Packages: ds.Packages,
PackageCount: ds.PackageCount,
}
}
// MissingStatus contains information about all the missing packages in a project.
type MissingStatus struct {
ProjectRoot string
MissingPackages []string
}
func (cmd *statusCommand) runStatusAll(ctx *dep.Ctx, out outputter, p *dep.Project, sm gps.SourceManager) (hasMissingPkgs bool, errCount int, err error) {
// While the network churns on ListVersions() requests, statically analyze
// code from the current project.
ptree := p.RootPackageTree
// Set up a solver in order to check the InputHash.
params := gps.SolveParameters{
ProjectAnalyzer: dep.Analyzer{},
RootDir: p.AbsRoot,
RootPackageTree: ptree,
Manifest: p.Manifest,
// Locks aren't a part of the input hash check, so we can omit it.
}
logger := ctx.Err
if ctx.Verbose {
params.TraceLogger = ctx.Err
} else {
logger = log.New(ioutil.Discard, "", 0)
}
if err := ctx.ValidateParams(sm, params); err != nil {
return false, 0, err
}
// Errors while collecting constraints should not fail the whole status run.
// It should count the error and tell the user about incomplete results.
cm, ccerrs := collectConstraints(ctx, p, sm)
if len(ccerrs) > 0 {
errCount += len(ccerrs)
}
// Get the project list and sort it so that the printed output users see is
// deterministically ordered. (This may be superfluous if the lock is always
// written in alpha order, but it doesn't hurt to double down.)
slp := p.Lock.Projects()
sort.Slice(slp, func(i, j int) bool {
return slp[i].Ident().Less(slp[j].Ident())
})
slcp := p.ChangedLock.Projects()
sort.Slice(slcp, func(i, j int) bool {
return slcp[i].Ident().Less(slcp[j].Ident())
})
lsat := verify.LockSatisfiesInputs(p.Lock, p.Manifest, params.RootPackageTree)
if lsat.Satisfied() {
// If the lock satisfies the inputs, we're guaranteed (barring manual
// meddling, about which we can do nothing) that the lock is a
// transitively complete picture of all deps. That eliminates the need
// for some checks.
logger.Println("Checking upstream projects:")
// DetailStatus channel to collect all the DetailStatus.
dsCh := make(chan *DetailStatus, len(slp))
// Error channels to collect different errors.
errListPkgCh := make(chan error, len(slp))
errListVerCh := make(chan error, len(slp))
var wg sync.WaitGroup
for i, proj := range slp {
wg.Add(1)
logger.Printf("(%d/%d) %s\n", i+1, len(slp), proj.Ident().ProjectRoot)
go func(proj verify.VerifiableProject) {
bs := BasicStatus{
ProjectRoot: string(proj.Ident().ProjectRoot),
PackageCount: len(proj.Packages()),
}
// Get children only for specific outputers
// in order to avoid slower status process.
switch out.(type) {
case *dotOutput:
ptr, err := sm.ListPackages(proj.Ident(), proj.Version())
if err != nil {
bs.hasError = true
errListPkgCh <- err
}
prm, _ := ptr.ToReachMap(true, true, false, p.Manifest.IgnoredPackages())
bs.Children = prm.FlattenFn(paths.IsStandardImportPath)
}
// Split apart the version from the lock into its constituent parts.
switch tv := proj.Version().(type) {
case gps.UnpairedVersion:
bs.Version = tv
case gps.Revision:
bs.Revision = tv
case gps.PairedVersion:
bs.Version = tv.Unpair()
bs.Revision = tv.Revision()
}
// Check if the manifest has an override for this project. If so,
// set that as the constraint.
if pp, has := p.Manifest.Ovr[proj.Ident().ProjectRoot]; has && pp.Constraint != nil {
bs.hasOverride = true
bs.Constraint = pp.Constraint
} else if pp, has := p.Manifest.Constraints[proj.Ident().ProjectRoot]; has && pp.Constraint != nil {
// If the manifest has a constraint then set that as the constraint.
bs.Constraint = pp.Constraint
} else {
bs.Constraint = gps.Any()
for _, c := range cm[bs.ProjectRoot] {
bs.Constraint = c.Constraint.Intersect(bs.Constraint)
}
}
// Only if we have a non-rev and non-plain version do/can we display
// anything wrt the version's updateability.
if bs.Version != nil && bs.Version.Type() != gps.IsVersion {
c, has := p.Manifest.Constraints[proj.Ident().ProjectRoot]
if !has {
// Get constraint for locked project
for _, lockedP := range p.Lock.P {
if lockedP.Ident().ProjectRoot == proj.Ident().ProjectRoot {
// Use the unpaired version as the constraint for checking updates.
c.Constraint = bs.Version
}
}
}
// TODO: This constraint is only the constraint imposed by the
// current project, not by any transitive deps. As a result,
// transitive project deps will always show "any" here.
bs.Constraint = c.Constraint
vl, err := sm.ListVersions(proj.Ident())
if err == nil {
gps.SortPairedForUpgrade(vl)
for _, v := range vl {
// Because we've sorted the version list for
// upgrade, the first version we encounter that
// matches our constraint will be what we want.
if c.Constraint.Matches(v) {
// Latest should be of the same type as the Version.
if bs.Version.Type() == gps.IsSemver {
bs.Latest = v
} else {
bs.Latest = v.Revision()
}
break
}
}
} else {
// Failed to fetch version list (could happen due to
// network issue).
bs.hasError = true
errListVerCh <- err
}
}
ds := DetailStatus{
BasicStatus: bs,
}
if cmd.detail {
ds.Source = proj.Ident().Source
ds.Packages = proj.Packages()
ds.PruneOpts = proj.PruneOpts
ds.Digest = proj.Digest
}
dsCh <- &ds
wg.Done()
}(proj.(verify.VerifiableProject))
}
wg.Wait()
close(dsCh)
close(errListPkgCh)
close(errListVerCh)
// Newline after printing the status progress output.
logger.Println()
// List Packages errors. This would happen only for dot output.
if len(errListPkgCh) > 0 {
err = errFai
gitextract_vozcu06k/
├── .codeclimate.yml
├── .gitattributes
├── .github/
│ ├── CODEOWNERS
│ ├── ISSUE_TEMPLATE.md
│ └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .travis.yml
├── AUTHORS
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTORS
├── Gopkg.toml
├── LICENSE
├── MAINTAINERS.md
├── Makefile
├── PATENTS
├── README.md
├── analyzer.go
├── analyzer_notwindows_test.go
├── analyzer_test.go
├── analyzer_windows_test.go
├── appveyor.yml
├── cmd/
│ └── dep/
│ ├── check.go
│ ├── dep_test.go
│ ├── doc.go
│ ├── ensure.go
│ ├── ensure_test.go
│ ├── failures.go
│ ├── feature_flags.go
│ ├── gopath_scanner.go
│ ├── gopath_scanner_test.go
│ ├── graphviz.go
│ ├── graphviz_test.go
│ ├── init.go
│ ├── integration_test.go
│ ├── main.go
│ ├── mkdoc.sh
│ ├── prune.go
│ ├── root_analyzer.go
│ ├── status.go
│ ├── status_test.go
│ ├── testdata/
│ │ ├── cachedir/
│ │ │ ├── Gopkg.toml
│ │ │ └── main.go
│ │ ├── graphviz/
│ │ │ ├── case1.dot
│ │ │ ├── case2.dot
│ │ │ ├── empty.dot
│ │ │ ├── subgraph1.dot
│ │ │ ├── subgraph2.dot
│ │ │ ├── subgraph3.dot
│ │ │ └── subgraph4.dot
│ │ ├── harness_tests/
│ │ │ ├── README.md
│ │ │ ├── check/
│ │ │ │ ├── excess_inputs/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── hash_mismatch/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ └── deptest.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── hash_version_mismatch/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ └── deptest.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── missing_and_excess/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── missing_inputs/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── noverify/
│ │ │ │ │ ├── hash_mismatch/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ │ └── deptest.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hash_version_mismatch/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ │ └── deptest.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── missing_and_excess/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── unmet_constraint/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── unmet_override/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── vendororphans/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ ├── foo
│ │ │ │ │ │ ├── github.com/
│ │ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ │ └── deptest.go
│ │ │ │ │ │ └── orphdir/
│ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── pruneopts_changed/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ └── deptest.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── unmet_constraint/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── unmet_override/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ └── vendororphans/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ ├── main.go
│ │ │ │ │ └── vendor/
│ │ │ │ │ ├── foo
│ │ │ │ │ ├── github.com/
│ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ └── deptest.go
│ │ │ │ │ └── orphdir/
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── stdout.txt
│ │ │ │ └── testcase.json
│ │ │ ├── ensure/
│ │ │ │ ├── add/
│ │ │ │ │ ├── all-new/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── all-new-double/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── all-new-double-spec/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── all-new-spec/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── desync/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── stdout.txt
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── errs/
│ │ │ │ │ │ ├── double-diff-spec/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ ├── exists/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ ├── exists-manifest/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ ├── noarg/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ └── self-add/
│ │ │ │ │ │ ├── case1/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ └── case2/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── exists-imports/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── exists-manifest-constraint/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── default/
│ │ │ │ │ ├── errs/
│ │ │ │ │ │ ├── lockless-vendoronly/
│ │ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ │ └── testcase.json
│ │ │ │ │ │ └── specargs/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hasheq/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hasheq-dry/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hasheq-novendor/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hasheq-novendor-dry/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── hashneq-vendoronly/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── nocode-vendoronly/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── empty/
│ │ │ │ │ ├── case1/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── case2/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── case3/
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── samples/
│ │ │ │ │ │ └── samples.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── noverify/
│ │ │ │ │ ├── hash_mismatch/
│ │ │ │ │ │ ├── README
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ │ └── github.com/
│ │ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ │ ├── deptest.go
│ │ │ │ │ │ │ └── extrafile
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── vendororphans/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ ├── foo
│ │ │ │ │ │ ├── github.com/
│ │ │ │ │ │ │ └── sdboyer/
│ │ │ │ │ │ │ └── deptest/
│ │ │ │ │ │ │ └── deptest.go
│ │ │ │ │ │ └── orphdir/
│ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── pkg-errors/
│ │ │ │ │ ├── case1/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── case2/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── bar/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── baz/
│ │ │ │ │ │ └── .gitignore
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── pkg-ignored/
│ │ │ │ │ ├── wildcard-ignore/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ │ └── samples/
│ │ │ │ │ │ │ ├── samples.go
│ │ │ │ │ │ │ └── subsamples/
│ │ │ │ │ │ │ └── subsamples.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── wildcard-other-root/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── samples/
│ │ │ │ │ │ ├── samples.go
│ │ │ │ │ │ └── subsamples/
│ │ │ │ │ │ └── subsamples.go
│ │ │ │ │ └── testcase.json
│ │ │ │ └── update/
│ │ │ │ ├── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── desync/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── errs/
│ │ │ │ │ ├── lockless/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── nonroot-arg/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── not-in-lock/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── spec-with-constraint/
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── spec-with-source/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ └── novendor/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ └── testcase.json
│ │ │ ├── init/
│ │ │ │ ├── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── foo/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── case2/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── foo/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── case3/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── foo/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── case4/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── foo/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── glide/
│ │ │ │ │ ├── case1/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ │ └── samples/
│ │ │ │ │ │ │ └── samples.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── case2/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── case3/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── case4/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── corrupt-glide/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── direct-trans-conflict/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── direct-trans-no-conflict/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── trans-trans/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ ├── trans-trans-conflict/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json.ignore
│ │ │ │ │ ├── trans-trans-trans/
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── final/
│ │ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ │ ├── initial/
│ │ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── trans-trans-unspecified/
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── glide.yaml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── glock/
│ │ │ │ │ └── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── GLOCKFILE
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── godep/
│ │ │ │ │ └── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Godeps/
│ │ │ │ │ │ │ └── Godeps.json
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── govend/
│ │ │ │ │ └── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor.yml
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── govendor/
│ │ │ │ │ └── case1/
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ ├── samples/
│ │ │ │ │ │ │ └── samples.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ └── vendor.json
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── gvt/
│ │ │ │ │ └── case1/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── main.go
│ │ │ │ │ │ └── vendor/
│ │ │ │ │ │ └── manifest
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── manifest-exists/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── relative_path/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── project_dir/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ └── project_dir/
│ │ │ │ │ │ ├── foo/
│ │ │ │ │ │ │ └── bar.go
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── skip-hidden/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── .foo/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── _foo/
│ │ │ │ │ │ │ └── main.go
│ │ │ │ │ │ ├── lib.go
│ │ │ │ │ │ └── testdata/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── usage/
│ │ │ │ │ ├── with_h_flag/
│ │ │ │ │ │ └── testcase.json
│ │ │ │ │ └── with_not_defined_flag/
│ │ │ │ │ └── testcase.json
│ │ │ │ └── vndr/
│ │ │ │ └── case1/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── main.go
│ │ │ │ │ └── vendor.conf
│ │ │ │ └── testcase.json
│ │ │ └── status/
│ │ │ ├── case1/
│ │ │ │ ├── dot/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── json/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ ├── table/
│ │ │ │ │ ├── final/
│ │ │ │ │ │ └── Gopkg.toml
│ │ │ │ │ ├── initial/
│ │ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── stdout.txt
│ │ │ │ │ └── testcase.json
│ │ │ │ └── template/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ ├── stdout.txt
│ │ │ │ └── testcase.json
│ │ │ ├── missing_pkgs_lock_mismatch/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ └── testcase.json
│ │ │ ├── old_constraints/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ ├── stdout.txt
│ │ │ │ └── testcase.json
│ │ │ ├── override_constraint/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ ├── stdout.txt
│ │ │ │ └── testcase.json
│ │ │ ├── revision_constraint/
│ │ │ │ ├── final/
│ │ │ │ │ └── Gopkg.toml
│ │ │ │ ├── initial/
│ │ │ │ │ ├── Gopkg.toml
│ │ │ │ │ └── main.go
│ │ │ │ ├── stdout.txt
│ │ │ │ └── testcase.json
│ │ │ └── without_lock/
│ │ │ ├── final/
│ │ │ │ └── Gopkg.toml
│ │ │ ├── initial/
│ │ │ │ └── Gopkg.toml
│ │ │ └── testcase.json
│ │ ├── init/
│ │ │ └── directdeps/
│ │ │ └── main.go
│ │ └── status/
│ │ └── collect_constraints/
│ │ └── main.go
│ └── version.go
├── context.go
├── context_test.go
├── doc.go
├── docs/
│ ├── FAQ.md
│ ├── Gopkg.lock.md
│ ├── Gopkg.toml.md
│ ├── daily-dep.md
│ ├── deduction.md
│ ├── ensure-mechanics.md
│ ├── env-vars.md
│ ├── failure-modes.md
│ ├── glossary.md
│ ├── installation.md
│ ├── introduction.md
│ ├── migrating.md
│ ├── new-project.md
│ ├── the-solver.md
│ └── uninstalling.md
├── gps/
│ ├── _testdata/
│ │ ├── badrepo/
│ │ │ └── README.md
│ │ ├── cmd/
│ │ │ ├── echosleep/
│ │ │ │ └── echosleep.go
│ │ │ └── stdout_stderr/
│ │ │ └── stdout_stderr.go
│ │ ├── digest/
│ │ │ ├── github.com/
│ │ │ │ ├── alice/
│ │ │ │ │ ├── match/
│ │ │ │ │ │ └── match.go
│ │ │ │ │ ├── mismatch/
│ │ │ │ │ │ └── mismatch.go
│ │ │ │ │ └── notInLock/
│ │ │ │ │ └── notInLock.go
│ │ │ │ └── bob/
│ │ │ │ ├── emptyDigest/
│ │ │ │ │ └── emptyDigest.go
│ │ │ │ └── match/
│ │ │ │ └── match.go
│ │ │ └── launchpad.net/
│ │ │ └── match/
│ │ │ └── match.go
│ │ └── src/
│ │ ├── bad/
│ │ │ └── bad.go
│ │ ├── buildtag/
│ │ │ └── invalid.go
│ │ ├── canon_confl/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── canonical/
│ │ │ ├── main.go
│ │ │ └── sub/
│ │ │ └── sub.go
│ │ ├── cycle/
│ │ │ ├── a.go
│ │ │ ├── one/
│ │ │ │ └── a.go
│ │ │ └── two/
│ │ │ └── a.go
│ │ ├── disallow/
│ │ │ ├── a.go
│ │ │ └── testdata/
│ │ │ └── another.go
│ │ ├── dotgodir/
│ │ │ ├── .go/
│ │ │ │ ├── .gitkeep
│ │ │ │ └── dot.go
│ │ │ ├── .m1p/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ └── foo.go/
│ │ │ ├── .gitkeep
│ │ │ └── foo.go
│ │ ├── doublenest/
│ │ │ ├── a.go
│ │ │ └── namemismatch/
│ │ │ ├── m1p/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ └── nm.go
│ │ ├── empty/
│ │ │ └── .gitkeep
│ │ ├── github.com/
│ │ │ └── example/
│ │ │ └── varied/
│ │ │ ├── locals.go
│ │ │ ├── m1p/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ ├── main.go
│ │ │ ├── namemismatch/
│ │ │ │ └── nm.go
│ │ │ ├── otherpath/
│ │ │ │ └── otherpath_test.go
│ │ │ └── simple/
│ │ │ ├── another/
│ │ │ │ ├── another.go
│ │ │ │ ├── another_test.go
│ │ │ │ └── locals.go
│ │ │ ├── locals.go
│ │ │ └── simple.go
│ │ ├── igmain/
│ │ │ ├── a.go
│ │ │ └── igmain.go
│ │ ├── igmainfirst/
│ │ │ ├── igmain.go
│ │ │ └── z.go
│ │ ├── igmainlong/
│ │ │ ├── a.go
│ │ │ └── igmain.go
│ │ ├── igmaint/
│ │ │ ├── a.go
│ │ │ ├── igmain.go
│ │ │ └── t_test.go
│ │ ├── m1p/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── missing/
│ │ │ ├── a.go
│ │ │ └── m1p/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── nest/
│ │ │ ├── a.go
│ │ │ └── m1p/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── relimport/
│ │ │ ├── a.go
│ │ │ ├── dot/
│ │ │ │ └── a.go
│ │ │ ├── dotdot/
│ │ │ │ └── a.go
│ │ │ ├── dotdotslash/
│ │ │ │ └── a.go
│ │ │ └── dotslash/
│ │ │ └── a.go
│ │ ├── ren/
│ │ │ ├── m1p/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ └── simple/
│ │ │ └── a.go
│ │ ├── simple/
│ │ │ └── a.go
│ │ ├── simpleallt/
│ │ │ ├── a.go
│ │ │ ├── a_test.go
│ │ │ └── t_test.go
│ │ ├── simplet/
│ │ │ ├── a.go
│ │ │ └── t_test.go
│ │ ├── simplext/
│ │ │ ├── a.go
│ │ │ └── a_test.go
│ │ ├── skip_/
│ │ │ ├── _a.go
│ │ │ └── a.go
│ │ ├── slash-star_confl/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── t/
│ │ │ └── t_test.go
│ │ ├── twopkgs/
│ │ │ ├── a.go
│ │ │ └── b.go
│ │ ├── varied/
│ │ │ ├── locals.go
│ │ │ ├── m1p/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ ├── main.go
│ │ │ ├── namemismatch/
│ │ │ │ └── nm.go
│ │ │ ├── otherpath/
│ │ │ │ └── otherpath_test.go
│ │ │ └── simple/
│ │ │ ├── another/
│ │ │ │ ├── another.go
│ │ │ │ ├── another_test.go
│ │ │ │ └── locals.go
│ │ │ ├── locals.go
│ │ │ └── simple.go
│ │ ├── varied_hidden/
│ │ │ ├── .onlyfromtests/
│ │ │ │ ├── a.go
│ │ │ │ └── b.go
│ │ │ ├── _frommain/
│ │ │ │ └── a.go
│ │ │ ├── _never/
│ │ │ │ └── a.go
│ │ │ ├── _secondorder/
│ │ │ │ └── secondorder.go
│ │ │ ├── always/
│ │ │ │ └── always_test.go
│ │ │ ├── dotdotslash/
│ │ │ │ └── a.go
│ │ │ ├── locals.go
│ │ │ ├── main.go
│ │ │ └── simple/
│ │ │ ├── locals.go
│ │ │ ├── simple.go
│ │ │ └── testdata/
│ │ │ └── another.go
│ │ └── xt/
│ │ └── a_test.go
│ ├── bridge.go
│ ├── cmd.go
│ ├── cmd_unix.go
│ ├── cmd_windows.go
│ ├── constraint.go
│ ├── constraint_test.go
│ ├── deduce.go
│ ├── deduce_test.go
│ ├── discovery.go
│ ├── doc.go
│ ├── error.go
│ ├── example.go
│ ├── filesystem.go
│ ├── filesystem_test.go
│ ├── identifier.go
│ ├── internal/
│ │ └── pb/
│ │ ├── pb.go
│ │ ├── source_cache.pb.go
│ │ └── source_cache.proto
│ ├── lock.go
│ ├── lock_test.go
│ ├── manager_test.go
│ ├── manifest.go
│ ├── manifest_test.go
│ ├── maybe_source.go
│ ├── maybe_source_test.go
│ ├── metrics.go
│ ├── paths/
│ │ ├── paths.go
│ │ └── paths_test.go
│ ├── pkgtree/
│ │ ├── ignored_ruleset.go
│ │ ├── ignored_ruleset_test.go
│ │ ├── pkgtree.go
│ │ ├── pkgtree_test.go
│ │ └── reachmap.go
│ ├── prune.go
│ ├── prune_test.go
│ ├── rootdata.go
│ ├── rootdata_test.go
│ ├── satisfy.go
│ ├── selection.go
│ ├── selection_test.go
│ ├── solution.go
│ ├── solution_test.go
│ ├── solve_basic_test.go
│ ├── solve_bimodal_test.go
│ ├── solve_failures.go
│ ├── solve_test.go
│ ├── solver.go
│ ├── solver_inputs_test.go
│ ├── source.go
│ ├── source_cache.go
│ ├── source_cache_bolt.go
│ ├── source_cache_bolt_encode.go
│ ├── source_cache_bolt_encode_test.go
│ ├── source_cache_bolt_test.go
│ ├── source_cache_multi.go
│ ├── source_cache_test.go
│ ├── source_errors.go
│ ├── source_errors_test.go
│ ├── source_manager.go
│ ├── source_manager_test.go
│ ├── source_test.go
│ ├── strings.go
│ ├── trace.go
│ ├── typed_radix.go
│ ├── typed_radix_test.go
│ ├── vcs_repo.go
│ ├── vcs_repo_test.go
│ ├── vcs_source.go
│ ├── vcs_source_test.go
│ ├── vcs_version.go
│ ├── vcs_version_test.go
│ ├── verify/
│ │ ├── digest.go
│ │ ├── digest_test.go
│ │ ├── helper_types_test.go
│ │ ├── lock.go
│ │ ├── lockdiff.go
│ │ ├── lockdiff_test.go
│ │ ├── locksat.go
│ │ └── locksat_test.go
│ ├── version.go
│ ├── version_queue.go
│ ├── version_queue_test.go
│ └── version_test.go
├── hack/
│ ├── build-all.bash
│ ├── coverage.bash
│ ├── licenseok/
│ │ └── main.go
│ ├── lint.bash
│ ├── test.bash
│ ├── validate-gofmt.bash
│ └── validate-licence.bash
├── install.sh
├── internal/
│ ├── feedback/
│ │ ├── feedback.go
│ │ ├── feedback_test.go
│ │ ├── lockdiff.go
│ │ └── lockdiff_test.go
│ ├── fs/
│ │ ├── fs.go
│ │ ├── fs_test.go
│ │ ├── rename.go
│ │ ├── rename_windows.go
│ │ └── testdata/
│ │ └── test.file
│ ├── importers/
│ │ ├── base/
│ │ │ ├── importer.go
│ │ │ └── importer_test.go
│ │ ├── glide/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── glide.yaml
│ │ │ └── golden.txt
│ │ ├── glock/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── GLOCKFILE
│ │ │ └── golden.txt
│ │ ├── godep/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── Godeps.json
│ │ │ └── golden.txt
│ │ ├── govend/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── golden.txt
│ │ │ └── vendor.yml
│ │ ├── govendor/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── golden.txt
│ │ │ └── vendor.json
│ │ ├── gvt/
│ │ │ ├── importer.go
│ │ │ ├── importer_test.go
│ │ │ └── testdata/
│ │ │ ├── golden.txt
│ │ │ └── manifest
│ │ ├── importers.go
│ │ ├── importertest/
│ │ │ ├── testcase.go
│ │ │ └── testdata.go
│ │ └── vndr/
│ │ ├── importer.go
│ │ ├── importer_test.go
│ │ └── testdata/
│ │ ├── golden.txt
│ │ └── vendor.conf
│ └── test/
│ ├── integration/
│ │ ├── testcase.go
│ │ └── testproj.go
│ ├── test.go
│ └── writer.go
├── lock.go
├── lock_test.go
├── manifest.go
├── manifest_test.go
├── project.go
├── project_test.go
├── test_project_context_test.go
├── testdata/
│ ├── analyzer/
│ │ └── Gopkg.toml
│ ├── lock/
│ │ ├── error0.toml
│ │ ├── error1.toml
│ │ ├── error2.toml
│ │ ├── golden0.toml
│ │ └── golden1.toml
│ ├── manifest/
│ │ ├── error1.toml
│ │ ├── error2.toml
│ │ ├── error3.toml
│ │ └── golden.toml
│ ├── rootfind/
│ │ ├── Gopkg.toml
│ │ └── subdir/
│ │ └── .gitkeep
│ └── txn_writer/
│ ├── badinput_fileroot
│ ├── expected_diff_output.txt
│ ├── expected_lock.toml
│ └── expected_manifest.toml
├── txn_writer.go
├── txn_writer_test.go
├── vendor/
│ ├── github.com/
│ │ ├── Masterminds/
│ │ │ ├── semver/
│ │ │ │ ├── LICENSE.txt
│ │ │ │ ├── collection.go
│ │ │ │ ├── constraints.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── error.go
│ │ │ │ ├── magic.go
│ │ │ │ ├── parse.go
│ │ │ │ ├── range.go
│ │ │ │ ├── union.go
│ │ │ │ └── version.go
│ │ │ └── vcs/
│ │ │ ├── LICENSE.txt
│ │ │ ├── bzr.go
│ │ │ ├── errors.go
│ │ │ ├── git.go
│ │ │ ├── hg.go
│ │ │ ├── repo.go
│ │ │ ├── svn.go
│ │ │ ├── vcs_local_lookup.go
│ │ │ └── vcs_remote_lookup.go
│ │ ├── armon/
│ │ │ └── go-radix/
│ │ │ ├── LICENSE
│ │ │ └── radix.go
│ │ ├── boltdb/
│ │ │ └── bolt/
│ │ │ ├── LICENSE
│ │ │ ├── bolt_386.go
│ │ │ ├── bolt_amd64.go
│ │ │ ├── bolt_arm.go
│ │ │ ├── bolt_arm64.go
│ │ │ ├── bolt_linux.go
│ │ │ ├── bolt_openbsd.go
│ │ │ ├── bolt_ppc.go
│ │ │ ├── bolt_ppc64.go
│ │ │ ├── bolt_ppc64le.go
│ │ │ ├── bolt_s390x.go
│ │ │ ├── bolt_unix.go
│ │ │ ├── bolt_unix_solaris.go
│ │ │ ├── bolt_windows.go
│ │ │ ├── boltsync_unix.go
│ │ │ ├── bucket.go
│ │ │ ├── cursor.go
│ │ │ ├── db.go
│ │ │ ├── doc.go
│ │ │ ├── errors.go
│ │ │ ├── freelist.go
│ │ │ ├── node.go
│ │ │ ├── page.go
│ │ │ └── tx.go
│ │ ├── golang/
│ │ │ └── protobuf/
│ │ │ ├── AUTHORS
│ │ │ ├── CONTRIBUTORS
│ │ │ ├── LICENSE
│ │ │ └── proto/
│ │ │ ├── clone.go
│ │ │ ├── decode.go
│ │ │ ├── discard.go
│ │ │ ├── encode.go
│ │ │ ├── equal.go
│ │ │ ├── extensions.go
│ │ │ ├── lib.go
│ │ │ ├── message_set.go
│ │ │ ├── pointer_reflect.go
│ │ │ ├── pointer_unsafe.go
│ │ │ ├── properties.go
│ │ │ ├── text.go
│ │ │ └── text_parser.go
│ │ ├── google/
│ │ │ └── go-cmp/
│ │ │ ├── LICENSE
│ │ │ └── cmp/
│ │ │ ├── compare.go
│ │ │ ├── internal/
│ │ │ │ ├── diff/
│ │ │ │ │ ├── debug_disable.go
│ │ │ │ │ ├── debug_enable.go
│ │ │ │ │ └── diff.go
│ │ │ │ ├── function/
│ │ │ │ │ └── func.go
│ │ │ │ └── value/
│ │ │ │ ├── format.go
│ │ │ │ └── sort.go
│ │ │ ├── options.go
│ │ │ ├── path.go
│ │ │ ├── reporter.go
│ │ │ ├── unsafe_panic.go
│ │ │ └── unsafe_reflect.go
│ │ ├── jmank88/
│ │ │ └── nuts/
│ │ │ ├── LICENSE
│ │ │ ├── key.go
│ │ │ ├── nuts.go
│ │ │ ├── paths.go
│ │ │ └── types.go
│ │ ├── nightlyone/
│ │ │ └── lockfile/
│ │ │ ├── LICENSE
│ │ │ ├── lockfile.go
│ │ │ ├── lockfile_unix.go
│ │ │ └── lockfile_windows.go
│ │ ├── pelletier/
│ │ │ └── go-toml/
│ │ │ ├── LICENSE
│ │ │ ├── doc.go
│ │ │ ├── fuzz.go
│ │ │ ├── keysparsing.go
│ │ │ ├── lexer.go
│ │ │ ├── marshal.go
│ │ │ ├── parser.go
│ │ │ ├── position.go
│ │ │ ├── token.go
│ │ │ ├── toml.go
│ │ │ ├── tomltree_create.go
│ │ │ └── tomltree_write.go
│ │ ├── pkg/
│ │ │ └── errors/
│ │ │ ├── LICENSE
│ │ │ ├── errors.go
│ │ │ └── stack.go
│ │ └── sdboyer/
│ │ └── constext/
│ │ ├── LICENSE
│ │ └── constext.go
│ ├── golang.org/
│ │ └── x/
│ │ ├── net/
│ │ │ ├── AUTHORS
│ │ │ ├── CONTRIBUTORS
│ │ │ ├── LICENSE
│ │ │ ├── PATENTS
│ │ │ └── context/
│ │ │ ├── context.go
│ │ │ ├── go17.go
│ │ │ ├── go19.go
│ │ │ ├── pre_go17.go
│ │ │ └── pre_go19.go
│ │ ├── sync/
│ │ │ ├── AUTHORS
│ │ │ ├── CONTRIBUTORS
│ │ │ ├── LICENSE
│ │ │ ├── PATENTS
│ │ │ └── errgroup/
│ │ │ └── errgroup.go
│ │ └── sys/
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ └── unix/
│ │ ├── asm_darwin_386.s
│ │ ├── asm_darwin_amd64.s
│ │ ├── asm_darwin_arm.s
│ │ ├── asm_darwin_arm64.s
│ │ ├── asm_dragonfly_amd64.s
│ │ ├── asm_freebsd_386.s
│ │ ├── asm_freebsd_amd64.s
│ │ ├── asm_freebsd_arm.s
│ │ ├── asm_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_mipsx.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_netbsd_386.s
│ │ ├── asm_netbsd_amd64.s
│ │ ├── asm_netbsd_arm.s
│ │ ├── asm_openbsd_386.s
│ │ ├── asm_openbsd_amd64.s
│ │ ├── asm_openbsd_arm.s
│ │ ├── asm_solaris_amd64.s
│ │ ├── bluetooth_linux.go
│ │ ├── cap_freebsd.go
│ │ ├── constants.go
│ │ ├── dev_linux.go
│ │ ├── dirent.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── env_unix.go
│ │ ├── env_unset.go
│ │ ├── errors_freebsd_386.go
│ │ ├── errors_freebsd_amd64.go
│ │ ├── errors_freebsd_arm.go
│ │ ├── file_unix.go
│ │ ├── flock.go
│ │ ├── flock_linux_32bit.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── gccgo_linux_sparc64.go
│ │ ├── mkpost.go
│ │ ├── openbsd_pledge.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_386.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_amd64.go
│ │ ├── syscall_linux_amd64_gc.go
│ │ ├── syscall_linux_arm.go
│ │ ├── syscall_linux_arm64.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.go
│ │ ├── syscall_linux_ppc64x.go
│ │ ├── syscall_linux_s390x.go
│ │ ├── syscall_linux_sparc64.go
│ │ ├── syscall_netbsd.go
│ │ ├── syscall_netbsd_386.go
│ │ ├── syscall_netbsd_amd64.go
│ │ ├── syscall_netbsd_arm.go
│ │ ├── syscall_no_getwd.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── types_darwin.go
│ │ ├── types_dragonfly.go
│ │ ├── types_freebsd.go
│ │ ├── types_netbsd.go
│ │ ├── types_openbsd.go
│ │ ├── types_solaris.go
│ │ ├── zerrors_darwin_386.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_linux_sparc64.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_openbsd_arm.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zsyscall_darwin_386.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_arm.go
│ │ ├── zsyscall_darwin_arm64.go
│ │ ├── zsyscall_dragonfly_amd64.go
│ │ ├── zsyscall_freebsd_386.go
│ │ ├── zsyscall_freebsd_amd64.go
│ │ ├── zsyscall_freebsd_arm.go
│ │ ├── zsyscall_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.go
│ │ ├── zsyscall_linux_ppc64.go
│ │ ├── zsyscall_linux_ppc64le.go
│ │ ├── zsyscall_linux_s390x.go
│ │ ├── zsyscall_linux_sparc64.go
│ │ ├── zsyscall_netbsd_386.go
│ │ ├── zsyscall_netbsd_amd64.go
│ │ ├── zsyscall_netbsd_arm.go
│ │ ├── zsyscall_openbsd_386.go
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_openbsd_arm.go
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsysctl_openbsd.go
│ │ ├── zsysnum_darwin_386.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm.go
│ │ ├── zsysnum_darwin_arm64.go
│ │ ├── zsysnum_dragonfly_amd64.go
│ │ ├── zsysnum_freebsd_386.go
│ │ ├── zsysnum_freebsd_amd64.go
│ │ ├── zsysnum_freebsd_arm.go
│ │ ├── zsysnum_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.go
│ │ ├── zsysnum_linux_ppc64.go
│ │ ├── zsysnum_linux_ppc64le.go
│ │ ├── zsysnum_linux_s390x.go
│ │ ├── zsysnum_linux_sparc64.go
│ │ ├── zsysnum_netbsd_386.go
│ │ ├── zsysnum_netbsd_amd64.go
│ │ ├── zsysnum_netbsd_arm.go
│ │ ├── zsysnum_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_openbsd_arm.go
│ │ ├── zsysnum_solaris_amd64.go
│ │ ├── ztypes_darwin_386.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_linux_sparc64.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ └── ztypes_solaris_amd64.go
│ └── gopkg.in/
│ └── yaml.v2/
│ ├── LICENSE
│ ├── LICENSE.libyaml
│ ├── apic.go
│ ├── decode.go
│ ├── emitterc.go
│ ├── encode.go
│ ├── parserc.go
│ ├── readerc.go
│ ├── resolve.go
│ ├── scannerc.go
│ ├── sorter.go
│ ├── writerc.go
│ ├── yaml.go
│ ├── yamlh.go
│ └── yamlprivateh.go
└── website/
├── .gitignore
├── blog/
│ ├── 2018-01-23-announce-v0.4.0.md
│ └── 2018-07-25-announce-v0.5.0.md
├── core/
│ └── Footer.js
├── i18n/
│ └── en.json
├── package.json
├── pages/
│ └── en/
│ ├── help.js
│ ├── index.js
│ └── users.js
├── sidebars.json
├── siteConfig.js
└── static/
└── css/
└── custom.css
Showing preview only (5,380K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (69107 symbols across 537 files)
FILE: analyzer.go
type Analyzer (line 16) | type Analyzer struct
method HasDepMetadata (line 19) | func (a Analyzer) HasDepMetadata(path string) bool {
method DeriveManifestAndLock (line 27) | func (a Analyzer) DeriveManifestAndLock(path string, n gps.ProjectRoot...
method Info (line 48) | func (a Analyzer) Info() gps.ProjectAnalyzerInfo {
FILE: analyzer_notwindows_test.go
function makeUnreadable (line 14) | func makeUnreadable(path string) (io.Closer, error) {
type closer (line 22) | type closer struct
method Close (line 24) | func (closer) Close() error { return nil }
FILE: analyzer_test.go
function TestAnalyzerDeriveManifestAndLock (line 14) | func TestAnalyzerDeriveManifestAndLock(t *testing.T) {
function TestAnalyzerDeriveManifestAndLockDoesNotExist (line 50) | func TestAnalyzerDeriveManifestAndLockDoesNotExist(t *testing.T) {
function TestAnalyzerDeriveManifestAndLockCannotOpen (line 64) | func TestAnalyzerDeriveManifestAndLockCannotOpen(t *testing.T) {
function TestAnalyzerDeriveManifestAndLockInvalidManifest (line 88) | func TestAnalyzerDeriveManifestAndLockInvalidManifest(t *testing.T) {
function TestAnalyzerInfo (line 105) | func TestAnalyzerInfo(t *testing.T) {
FILE: analyzer_windows_test.go
function makeUnreadable (line 16) | func makeUnreadable(path string) (io.Closer, error) {
FILE: cmd/dep/check.go
constant checkShortHelp (line 24) | checkShortHelp = `Check if imports, Gopkg.toml, and Gopkg.lock are in sync`
constant checkLongHelp (line 25) | checkLongHelp = `
type checkCommand (line 42) | type checkCommand struct
method Name (line 47) | func (cmd *checkCommand) Name() string { return "check" }
method Args (line 48) | func (cmd *checkCommand) Args() string {
method ShortHelp (line 51) | func (cmd *checkCommand) ShortHelp() string { return checkShortHelp }
method LongHelp (line 52) | func (cmd *checkCommand) LongHelp() string { return checkLongHelp }
method Hidden (line 53) | func (cmd *checkCommand) Hidden() bool { return false }
method Register (line 55) | func (cmd *checkCommand) Register(fs *flag.FlagSet) {
method Run (line 61) | func (cmd *checkCommand) Run(ctx *dep.Ctx, args []string) error {
function sprintLockUnsat (line 229) | func sprintLockUnsat(lsat verify.LockSatisfaction) string {
FILE: cmd/dep/dep_test.go
function TestMain (line 20) | func TestMain(m *testing.M) {
FILE: cmd/dep/ensure.go
constant ensureShortHelp (line 27) | ensureShortHelp = `Ensure a dependency is safely vendored in the project`
constant ensureLongHelp (line 28) | ensureLongHelp = `
constant ensureExamples (line 59) | ensureExamples = `
type ensureCommand (line 143) | type ensureCommand struct
method Name (line 126) | func (cmd *ensureCommand) Name() string { return "ensure" }
method Args (line 127) | func (cmd *ensureCommand) Args() string {
method ShortHelp (line 130) | func (cmd *ensureCommand) ShortHelp() string { return ensureShortHelp }
method LongHelp (line 131) | func (cmd *ensureCommand) LongHelp() string { return ensureLongHelp }
method Hidden (line 132) | func (cmd *ensureCommand) Hidden() bool { return false }
method Register (line 134) | func (cmd *ensureCommand) Register(fs *flag.FlagSet) {
method Run (line 152) | func (cmd *ensureCommand) Run(ctx *dep.Ctx, args []string) error {
method validateFlags (line 221) | func (cmd *ensureCommand) validateFlags() error {
method vendorBehavior (line 241) | func (cmd *ensureCommand) vendorBehavior() dep.VendorBehavior {
method runDefault (line 248) | func (cmd *ensureCommand) runDefault(ctx *dep.Ctx, args []string, p *d...
method runVendorOnly (line 304) | func (cmd *ensureCommand) runVendorOnly(ctx *dep.Ctx, args []string, p...
method runUpdate (line 332) | func (cmd *ensureCommand) runUpdate(ctx *dep.Ctx, args []string, p *de...
method runAdd (line 379) | func (cmd *ensureCommand) runAdd(ctx *dep.Ctx, args []string, p *dep.P...
function getProjectConstraint (line 687) | func getProjectConstraint(arg string, sm gps.SourceManager) (gps.Project...
function checkErrors (line 726) | func checkErrors(m map[string]pkgtree.PackageOrErr, ignore *pkgtree.Igno...
type pkgtreeErrs (line 770) | type pkgtreeErrs
method Error (line 772) | func (e pkgtreeErrs) Error() string {
function validateUpdateArgs (line 782) | func validateUpdateArgs(ctx *dep.Ctx, args []string, p *dep.Project, sm ...
FILE: cmd/dep/ensure_test.go
function TestInvalidEnsureFlagCombinations (line 22) | func TestInvalidEnsureFlagCombinations(t *testing.T) {
function TestCheckErrors (line 62) | func TestCheckErrors(t *testing.T) {
function TestValidateUpdateArgs (line 149) | func TestValidateUpdateArgs(t *testing.T) {
FILE: cmd/dep/failures.go
function handleAllTheFailuresOfTheWorld (line 16) | func handleAllTheFailuresOfTheWorld(err error) error {
FILE: cmd/dep/feature_flags.go
constant flagImportDuringSolveKey (line 13) | flagImportDuringSolveKey = "ImportDuringSolve"
function parseFeatureFlag (line 24) | func parseFeatureFlag(flag string) bool {
function readFeatureFlag (line 29) | func readFeatureFlag(flag string) (bool, error) {
function importDuringSolve (line 37) | func importDuringSolve() bool {
FILE: cmd/dep/gopath_scanner.go
type gopathScanner (line 25) | type gopathScanner struct
method InitializeRootManifestAndLock (line 47) | func (g *gopathScanner) InitializeRootManifestAndLock(rootM *dep.Manif...
method overlay (line 87) | func (g *gopathScanner) overlay(rootM *dep.Manifest, rootL *dep.Lock) {
method scanGopathForDependencies (line 203) | func (g *gopathScanner) scanGopathForDependencies() (projectData, erro...
function newGopathScanner (line 35) | func newGopathScanner(ctx *dep.Ctx, directDeps map[gps.ProjectRoot]bool,...
function trimPathPrefix (line 151) | func trimPathPrefix(p1, p2 string) string {
function contains (line 159) | func contains(a []string, b string) bool {
function getProjectPropertiesFromVersion (line 170) | func getProjectPropertiesFromVersion(v gps.Version) gps.ProjectProperties {
type projectData (line 195) | type projectData struct
FILE: cmd/dep/gopath_scanner_test.go
constant testProject1 (line 18) | testProject1 = "github.com/sdboyer/deptest"
constant testProject2 (line 19) | testProject2 = "github.com/sdboyer/deptestdos"
function NewTestContext (line 22) | func NewTestContext(h *test.Helper) *dep.Ctx {
function TestGopathScanner_OverlayManifestConstraints (line 34) | func TestGopathScanner_OverlayManifestConstraints(t *testing.T) {
function TestGopathScanner_OverlayLockProjects (line 87) | func TestGopathScanner_OverlayLockProjects(t *testing.T) {
function TestContains (line 135) | func TestContains(t *testing.T) {
function TestGetProjectPropertiesFromVersion (line 147) | func TestGetProjectPropertiesFromVersion(t *testing.T) {
FILE: cmd/dep/graphviz.go
type graphviz (line 15) | type graphviz struct
method New (line 37) | func (g graphviz) New() *graphviz {
method output (line 46) | func (g *graphviz) output(project string) bytes.Buffer {
method createProjectRelations (line 90) | func (g *graphviz) createProjectRelations() {
method createProjectPackageRelations (line 112) | func (g *graphviz) createProjectPackageRelations(project string, clust...
method createNode (line 166) | func (g *graphviz) createNode(project, version string, children []stri...
method createSubgraph (line 231) | func (g *graphviz) createSubgraph(project string, packages map[string]...
type gvnode (line 24) | type gvnode struct
method hash (line 177) | func (dp gvnode) hash() uint32 {
method label (line 183) | func (dp gvnode) label() string {
type byGvnode (line 31) | type byGvnode
method Len (line 33) | func (n byGvnode) Len() int { return len(n) }
method Swap (line 34) | func (n byGvnode) Swap(i, j int) { n[i], n[j] = n[j], n[i] }
method Less (line 35) | func (n byGvnode) Less(i, j int) bool { return n[i].project < n[j].pro...
function isPathPrefix (line 203) | func isPathPrefix(path, pre string) bool {
type gvsubgraph (line 213) | type gvsubgraph struct
method hash (line 220) | func (sg gvsubgraph) hash() uint32 {
function sortClusters (line 273) | func sortClusters(clusters map[string]*gvsubgraph) []*gvsubgraph {
FILE: cmd/dep/graphviz_test.go
function TestEmptyProject (line 14) | func TestEmptyProject(t *testing.T) {
function TestSimpleProject (line 29) | func TestSimpleProject(t *testing.T) {
function TestNoLinks (line 47) | func TestNoLinks(t *testing.T) {
function TestIsPathPrefix (line 63) | func TestIsPathPrefix(t *testing.T) {
function TestSimpleSubgraphs (line 86) | func TestSimpleSubgraphs(t *testing.T) {
function TestCreateSubgraph (line 224) | func TestCreateSubgraph(t *testing.T) {
FILE: cmd/dep/init.go
constant initShortHelp (line 21) | initShortHelp = `Set up a new Go project, or migrate an existing one`
constant initLongHelp (line 22) | initLongHelp = `
type initCommand (line 65) | type initCommand struct
method Name (line 53) | func (cmd *initCommand) Name() string { return "init" }
method Args (line 54) | func (cmd *initCommand) Args() string { return "[root]" }
method ShortHelp (line 55) | func (cmd *initCommand) ShortHelp() string { return initShortHelp }
method LongHelp (line 56) | func (cmd *initCommand) LongHelp() string { return initLongHelp }
method Hidden (line 57) | func (cmd *initCommand) Hidden() bool { return false }
method Register (line 59) | func (cmd *initCommand) Register(fs *flag.FlagSet) {
method Run (line 71) | func (cmd *initCommand) Run(ctx *dep.Ctx, args []string) error {
method establishProjectAt (line 197) | func (cmd *initCommand) establishProjectAt(root string, ctx *dep.Ctx) ...
FILE: cmd/dep/integration_test.go
function TestIntegration (line 23) | func TestIntegration(t *testing.T) {
function TestDepCachedir (line 57) | func TestDepCachedir(t *testing.T) {
function execCmd (line 118) | func execCmd(prog string, args []string, stdout, stderr io.Writer, dir s...
function runMain (line 128) | func runMain(prog string, args []string, stdout, stderr io.Writer, dir s...
function testIntegration (line 153) | func testIntegration(name, relPath, wd string, run integration.RunFunc) ...
FILE: cmd/dep/main.go
type command (line 32) | type command interface
type silentfail (line 44) | type silentfail struct
method Error (line 46) | func (silentfail) Error() string {
function main (line 50) | func main() {
type Config (line 93) | type Config struct
method Run (line 101) | func (c *Config) Run() int {
function commandList (line 233) | func commandList() []command {
function fprintUsage (line 263) | func fprintUsage(w io.Writer) {
function resetUsage (line 289) | func resetUsage(logger *log.Logger, fs *flag.FlagSet, name, args, longHe...
function parseArgs (line 321) | func parseArgs(args []string) (cmdName string, printCmdUsage bool, exit ...
function getEnv (line 347) | func getEnv(env []string, key string) string {
type commentWriter (line 365) | type commentWriter struct
method Write (line 370) | func (c *commentWriter) Write(p []byte) (int, error) {
type profile (line 395) | type profile struct
method start (line 409) | func (p *profile) start() error {
method finish (line 430) | func (p *profile) finish() error {
method createOutput (line 449) | func (p *profile) createOutput(name string) error {
FILE: cmd/dep/prune.go
constant pruneShortHelp (line 23) | pruneShortHelp = `Pruning is now performed automatically by dep ensure.`
constant pruneLongHelp (line 24) | pruneLongHelp = `
type pruneCommand (line 30) | type pruneCommand struct
method Name (line 33) | func (cmd *pruneCommand) Name() string { return "prune" }
method Args (line 34) | func (cmd *pruneCommand) Args() string { return "" }
method ShortHelp (line 35) | func (cmd *pruneCommand) ShortHelp() string { return pruneShortHelp }
method LongHelp (line 36) | func (cmd *pruneCommand) LongHelp() string { return pruneLongHelp }
method Hidden (line 37) | func (cmd *pruneCommand) Hidden() bool { return true }
method Register (line 39) | func (cmd *pruneCommand) Register(fs *flag.FlagSet) {
method Run (line 42) | func (cmd *pruneCommand) Run(ctx *dep.Ctx, args []string) error {
function pruneProject (line 89) | func pruneProject(p *dep.Project, sm gps.SourceManager, logger *log.Logg...
function calculatePrune (line 162) | func calculatePrune(vendorDir string, keep []string, logger *log.Logger)...
function deleteDirs (line 190) | func deleteDirs(toDelete []string) error {
type byLen (line 201) | type byLen
method Len (line 203) | func (a byLen) Len() int { return len(a) }
method Swap (line 204) | func (a byLen) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
method Less (line 205) | func (a byLen) Less(i, j int) bool { return len(a[i]) > len(a[j]) }
FILE: cmd/dep/root_analyzer.go
type rootAnalyzer (line 24) | type rootAnalyzer struct
method InitializeRootManifestAndLock (line 40) | func (a *rootAnalyzer) InitializeRootManifestAndLock(dir string, pr gp...
method cacheDeps (line 62) | func (a *rootAnalyzer) cacheDeps(pr gps.ProjectRoot) error {
method importManifestAndLock (line 105) | func (a *rootAnalyzer) importManifestAndLock(dir string, pr gps.Projec...
method removeTransitiveDependencies (line 132) | func (a *rootAnalyzer) removeTransitiveDependencies(m *dep.Manifest) {
method DeriveManifestAndLock (line 143) | func (a *rootAnalyzer) DeriveManifestAndLock(dir string, pr gps.Projec...
method FinalizeRootManifestAndLock (line 167) | func (a *rootAnalyzer) FinalizeRootManifestAndLock(m *dep.Manifest, l ...
method Info (line 206) | func (a *rootAnalyzer) Info() gps.ProjectAnalyzerInfo {
function newRootAnalyzer (line 31) | func newRootAnalyzer(skipTools bool, ctx *dep.Ctx, directDeps map[gps.Pr...
FILE: cmd/dep/status.go
constant availableTemplateVariables (line 30) | availableTemplateVariables = "ProjectRoot, Constraint, Version, Revision...
constant availableDefaultTemplateVariables (line 31) | availableDefaultTemplateVariables = `.Projects[]{
constant statusShortHelp (line 41) | statusShortHelp = `Report the status of the project's dependencies`
constant statusLongHelp (line 42) | statusLongHelp = `
constant statusExamples (line 59) | statusExamples = `
constant shortRev (line 107) | shortRev uint8 = iota
constant longRev (line 108) | longRev
type statusCommand (line 136) | type statusCommand struct
method Name (line 118) | func (cmd *statusCommand) Name() string { return "status" }
method Args (line 119) | func (cmd *statusCommand) Args() string { return "[package...]" }
method ShortHelp (line 120) | func (cmd *statusCommand) ShortHelp() string { return statusShortHelp }
method LongHelp (line 121) | func (cmd *statusCommand) LongHelp() string { return statusLongHelp }
method Hidden (line 122) | func (cmd *statusCommand) Hidden() bool { return false }
method Register (line 124) | func (cmd *statusCommand) Register(fs *flag.FlagSet) {
method Run (line 433) | func (cmd *statusCommand) Run(ctx *dep.Ctx, args []string) error {
method validateFlags (line 545) | func (cmd *statusCommand) validateFlags() error {
method runOld (line 641) | func (cmd *statusCommand) runOld(ctx *dep.Ctx, out oldOutputter, p *de...
method runStatusAll (line 888) | func (cmd *statusCommand) runStatusAll(ctx *dep.Ctx, out outputter, p ...
type outputter (line 149) | type outputter interface
type oldOutputter (line 162) | type oldOutputter interface
type tableOutput (line 168) | type tableOutput struct
method BasicHeader (line 170) | func (out *tableOutput) BasicHeader() error {
method BasicFooter (line 175) | func (out *tableOutput) BasicFooter() error {
method BasicLine (line 179) | func (out *tableOutput) BasicLine(bs *BasicStatus) error {
method DetailHeader (line 192) | func (out *tableOutput) DetailHeader(metadata *dep.SolveMeta) error {
method DetailFooter (line 197) | func (out *tableOutput) DetailFooter(metadata *dep.SolveMeta) error {
method DetailLine (line 201) | func (out *tableOutput) DetailLine(ds *DetailStatus) error {
method MissingHeader (line 215) | func (out *tableOutput) MissingHeader() error {
method MissingLine (line 220) | func (out *tableOutput) MissingLine(ms *MissingStatus) error {
method MissingFooter (line 229) | func (out *tableOutput) MissingFooter() error {
method OldHeader (line 233) | func (out *tableOutput) OldHeader() error {
method OldLine (line 238) | func (out *tableOutput) OldLine(os *OldStatus) error {
method OldFooter (line 249) | func (out *tableOutput) OldFooter() error {
type jsonOutput (line 253) | type jsonOutput struct
method BasicHeader (line 261) | func (out *jsonOutput) BasicHeader() error {
method BasicFooter (line 266) | func (out *jsonOutput) BasicFooter() error {
method BasicLine (line 270) | func (out *jsonOutput) BasicLine(bs *BasicStatus) error {
method DetailHeader (line 275) | func (out *jsonOutput) DetailHeader(metadata *dep.SolveMeta) error {
method DetailFooter (line 280) | func (out *jsonOutput) DetailFooter(metadata *dep.SolveMeta) error {
method DetailLine (line 289) | func (out *jsonOutput) DetailLine(ds *DetailStatus) error {
method MissingHeader (line 294) | func (out *jsonOutput) MissingHeader() error {
method MissingLine (line 299) | func (out *jsonOutput) MissingLine(ms *MissingStatus) error {
method MissingFooter (line 304) | func (out *jsonOutput) MissingFooter() error {
method OldHeader (line 308) | func (out *jsonOutput) OldHeader() error {
method OldLine (line 313) | func (out *jsonOutput) OldLine(os *OldStatus) error {
method OldFooter (line 318) | func (out *jsonOutput) OldFooter() error {
type dotOutput (line 322) | type dotOutput struct
method BasicHeader (line 329) | func (out *dotOutput) BasicHeader() error {
method BasicFooter (line 341) | func (out *dotOutput) BasicFooter() error {
method BasicLine (line 347) | func (out *dotOutput) BasicLine(bs *BasicStatus) error {
method DetailHeader (line 352) | func (out *dotOutput) DetailHeader(metadata *dep.SolveMeta) error {
method DetailFooter (line 356) | func (out *dotOutput) DetailFooter(metadata *dep.SolveMeta) error {
method DetailLine (line 360) | func (out *dotOutput) DetailLine(ds *DetailStatus) error {
method MissingHeader (line 364) | func (out *dotOutput) MissingHeader() error { return nil }
method MissingLine (line 365) | func (out *dotOutput) MissingLine(ms *MissingStatus) error { return nil }
method MissingFooter (line 366) | func (out *dotOutput) MissingFooter() error { return nil }
type templateOutput (line 368) | type templateOutput struct
method BasicHeader (line 374) | func (out *templateOutput) BasicHeader() error { return nil }
method BasicFooter (line 375) | func (out *templateOutput) BasicFooter() error { return nil }
method BasicLine (line 376) | func (out *templateOutput) BasicLine(bs *BasicStatus) error {
method DetailHeader (line 388) | func (out *templateOutput) DetailHeader(metadata *dep.SolveMeta) error {
method DetailFooter (line 394) | func (out *templateOutput) DetailFooter(metadata *dep.SolveMeta) error {
method DetailLine (line 403) | func (out *templateOutput) DetailLine(ds *DetailStatus) error {
method OldHeader (line 421) | func (out *templateOutput) OldHeader() error { return nil }
method OldFooter (line 422) | func (out *templateOutput) OldFooter() error { return nil }
method OldLine (line 423) | func (out *templateOutput) OldLine(os *OldStatus) error {
method MissingHeader (line 427) | func (out *templateOutput) MissingHeader() error { return nil }
method MissingFooter (line 428) | func (out *templateOutput) MissingFooter() error { return nil }
method MissingLine (line 429) | func (out *templateOutput) MissingLine(ms *MissingStatus) error {
type OldStatus (line 596) | type OldStatus struct
method getConsolidatedConstraint (line 607) | func (os OldStatus) getConsolidatedConstraint() string {
method getConsolidatedLatest (line 619) | func (os OldStatus) getConsolidatedLatest(revSize uint8) string {
method marshalJSON (line 632) | func (os OldStatus) marshalJSON() *rawOldStatus {
type rawOldStatus (line 603) | type rawOldStatus struct
type rawStatus (line 726) | type rawStatus struct
type rawDetail (line 737) | type rawDetail struct
type rawDetailVersion (line 742) | type rawDetailVersion struct
type rawDetailProject (line 748) | type rawDetailProject struct
type rawDetailMetadata (line 760) | type rawDetailMetadata struct
function newRawMetadata (line 769) | func newRawMetadata(metadata *dep.SolveMeta) rawDetailMetadata {
type BasicStatus (line 785) | type BasicStatus struct
method getConsolidatedConstraint (line 808) | func (bs *BasicStatus) getConsolidatedConstraint() string {
method getConsolidatedVersion (line 825) | func (bs *BasicStatus) getConsolidatedVersion() string {
method getConsolidatedLatest (line 833) | func (bs *BasicStatus) getConsolidatedLatest(revSize uint8) string {
method marshalJSON (line 855) | func (bs *BasicStatus) marshalJSON() *rawStatus {
type DetailStatus (line 800) | type DetailStatus struct
method getPruneOpts (line 851) | func (ds *DetailStatus) getPruneOpts() string {
method marshalJSON (line 866) | func (ds *DetailStatus) marshalJSON() *rawDetailProject {
type MissingStatus (line 883) | type MissingStatus struct
function basicOutputAll (line 1195) | func basicOutputAll(out outputter, slp []gps.LockedProject, bsMap map[st...
function detailOutputAll (line 1213) | func detailOutputAll(out outputter, slp []gps.LockedProject, dsMap map[s...
function formatVersion (line 1228) | func formatVersion(v gps.Version) string {
function formatDetailVersion (line 1245) | func formatDetailVersion(v gps.Version, r gps.Revision) rawDetailVersion {
function formatDetailLatestVersion (line 1269) | func formatDetailLatestVersion(v gps.Version, hasError bool) rawDetailVe...
type projectConstraint (line 1280) | type projectConstraint struct
type constraintsCollection (line 1288) | type constraintsCollection
function collectConstraints (line 1293) | func collectConstraints(ctx *dep.Ctx, p *dep.Project, sm gps.SourceManag...
type byProject (line 1400) | type byProject
method Len (line 1402) | func (p byProject) Len() int { return len(p) }
method Swap (line 1403) | func (p byProject) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
method Less (line 1404) | func (p byProject) Less(i, j int) bool { return p[i].Project < p[j].Pr...
function parseStatusTemplate (line 1406) | func parseStatusTemplate(format string) (*template.Template, error) {
function tomlStrSplit (line 1437) | func tomlStrSplit(strlist []string) string {
constant statusLockTemplate (line 1457) | statusLockTemplate = `# This file is autogenerated, do not edit; changes...
FILE: cmd/dep/status_test.go
function TestStatusFormatVersion (line 26) | func TestStatusFormatVersion(t *testing.T) {
function TestBasicLine (line 43) | func TestBasicLine(t *testing.T) {
function TestDetailLine (line 201) | func TestDetailLine(t *testing.T) {
function TestBasicStatusGetConsolidatedConstraint (line 425) | func TestBasicStatusGetConsolidatedConstraint(t *testing.T) {
function TestBasicStatusGetConsolidatedVersion (line 478) | func TestBasicStatusGetConsolidatedVersion(t *testing.T) {
function TestBasicStatusGetConsolidatedLatest (line 515) | func TestBasicStatusGetConsolidatedLatest(t *testing.T) {
function TestCollectConstraints (line 572) | func TestCollectConstraints(t *testing.T) {
function TestValidateFlags (line 791) | func TestValidateFlags(t *testing.T) {
function execStatusTemplate (line 859) | func execStatusTemplate(w io.Writer, format string, data interface{}) er...
constant expectedStatusDetail (line 867) | expectedStatusDetail = `# This file is autogenerated, do not edit; chang...
function TestStatusDetailTemplates (line 878) | func TestStatusDetailTemplates(t *testing.T) {
FILE: cmd/dep/testdata/cachedir/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/excess_inputs/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/hash_mismatch/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/hash_mismatch/initial/vendor/github.com/sdboyer/deptest/deptest.go
type Foo (line 3) | type Foo
FILE: cmd/dep/testdata/harness_tests/check/hash_version_mismatch/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/hash_version_mismatch/initial/vendor/github.com/sdboyer/deptest/deptest.go
type Foo (line 3) | type Foo
FILE: cmd/dep/testdata/harness_tests/check/missing_and_excess/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/missing_inputs/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/noverify/hash_mismatch/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/noverify/hash_mismatch/initial/vendor/github.com/sdboyer/deptest/deptest.go
type Foo (line 3) | type Foo
FILE: cmd/dep/testdata/harness_tests/check/noverify/hash_version_mismatch/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/noverify/hash_version_mismatch/initial/vendor/github.com/sdboyer/deptest/deptest.go
type Foo (line 3) | type Foo
FILE: cmd/dep/testdata/harness_tests/check/noverify/missing_and_excess/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/noverify/unmet_constraint/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/noverify/unmet_override/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/noverify/vendororphans/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/noverify/vendororphans/initial/vendor/github.com/sdboyer/deptest/deptest.go
type Foo (line 3) | type Foo
FILE: cmd/dep/testdata/harness_tests/check/pruneopts_changed/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/pruneopts_changed/initial/vendor/github.com/sdboyer/deptest/deptest.go
type Foo (line 3) | type Foo
FILE: cmd/dep/testdata/harness_tests/check/unmet_constraint/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/unmet_override/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/vendororphans/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/check/vendororphans/initial/vendor/github.com/sdboyer/deptest/deptest.go
type Foo (line 3) | type Foo
FILE: cmd/dep/testdata/harness_tests/ensure/add/all-new-double-spec/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/all-new-double/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/all-new-spec/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/all-new/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/desync/final/main.go
function main (line 12) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/desync/initial/main.go
function main (line 13) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/errs/double-diff-spec/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/errs/exists-manifest/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/errs/exists/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/errs/noarg/final/main.go
function main (line 12) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/errs/noarg/initial/main.go
function main (line 12) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/errs/self-add/case1/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/errs/self-add/case2/initial/main.go
function main (line 7) | func main() {}
FILE: cmd/dep/testdata/harness_tests/ensure/add/exists-imports/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/add/exists-manifest-constraint/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/default/errs/lockless-vendoronly/final/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/default/errs/lockless-vendoronly/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/default/errs/specargs/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/default/hasheq-dry/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/default/hasheq-novendor-dry/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/default/hasheq-novendor/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/default/hasheq/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/default/hashneq-vendoronly/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/empty/case1/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/empty/case2/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/empty/case3/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/noverify/hash_mismatch/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/noverify/hash_mismatch/initial/vendor/github.com/sdboyer/deptest/deptest.go
type Foo (line 3) | type Foo
FILE: cmd/dep/testdata/harness_tests/ensure/noverify/vendororphans/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/noverify/vendororphans/initial/vendor/github.com/sdboyer/deptest/deptest.go
type Foo (line 3) | type Foo
FILE: cmd/dep/testdata/harness_tests/ensure/pkg-ignored/wildcard-ignore/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/pkg-ignored/wildcard-other-root/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/update/case1/initial/main.go
function main (line 12) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/update/desync/final/main.go
function main (line 12) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/update/desync/initial/main.go
function main (line 12) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/update/errs/lockless/final/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/update/errs/lockless/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/update/errs/nonroot-arg/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/update/errs/not-in-lock/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/update/errs/spec-with-constraint/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/update/errs/spec-with-source/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/ensure/update/novendor/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/case1/initial/foo/bar.go
function Foo (line 9) | func Foo() deptest.Foo {
FILE: cmd/dep/testdata/harness_tests/init/case1/initial/main.go
function main (line 14) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/case2/initial/foo/bar.go
function Foo (line 9) | func Foo() deptest.Foo {
FILE: cmd/dep/testdata/harness_tests/init/case2/initial/main.go
function main (line 14) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/case3/initial/foo/bar.go
function Foo (line 9) | func Foo() deptest.Foo {
FILE: cmd/dep/testdata/harness_tests/init/case3/initial/main.go
function main (line 14) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/case4/initial/foo/bar.go
function Foo (line 9) | func Foo() deptest.Foo {
FILE: cmd/dep/testdata/harness_tests/init/case4/initial/main.go
function main (line 14) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/glide/case1/initial/main.go
function main (line 14) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/glide/case1/initial/samples/samples.go
function Sample1 (line 9) | func Sample1() int {
FILE: cmd/dep/testdata/harness_tests/init/glide/case2/initial/main.go
function main (line 13) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/glide/case3/initial/main.go
function main (line 13) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/glide/case4/initial/main.go
function main (line 13) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/main.go
type PointToDepTestGlideAv010 (line 11) | type PointToDepTestGlideAv010
FILE: cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/main.go
type PointToDepTestGlideAv010 (line 12) | type PointToDepTestGlideAv010
type FooVersion2 (line 13) | type FooVersion2
FILE: cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/main.go
type PointToDepTestGlideAv010 (line 12) | type PointToDepTestGlideAv010
type FooVersion2 (line 13) | type FooVersion2
FILE: cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/main.go
type PointToDepTestGlideCv010 (line 12) | type PointToDepTestGlideCv010
type PointToDepTestGlideCv020 (line 13) | type PointToDepTestGlideCv020
FILE: cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/main.go
type PointToDepTestGlideAv010 (line 11) | type PointToDepTestGlideAv010
FILE: cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/main.go
type PointToDepTestGlideCv010 (line 12) | type PointToDepTestGlideCv010
type PointToDepTestGlideCv020 (line 13) | type PointToDepTestGlideCv020
FILE: cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/main.go
type PointToDepTestGlideCv010 (line 12) | type PointToDepTestGlideCv010
type PointToDepTestGlideCv020 (line 13) | type PointToDepTestGlideCv020
FILE: cmd/dep/testdata/harness_tests/init/glock/case1/initial/main.go
function main (line 13) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/godep/case1/initial/main.go
function main (line 13) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/govend/case1/initial/main.go
function main (line 13) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/govendor/case1/initial/main.go
function main (line 13) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/govendor/case1/initial/samples/samples.go
function Sample1 (line 9) | func Sample1() int {
FILE: cmd/dep/testdata/harness_tests/init/gvt/case1/initial/main.go
function main (line 15) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/relative_path/initial/project_dir/foo/bar.go
function Foo (line 9) | func Foo() deptest.Foo {
FILE: cmd/dep/testdata/harness_tests/init/relative_path/initial/project_dir/main.go
function main (line 13) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/skip-hidden/initial/.foo/main.go
function main (line 14) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/skip-hidden/initial/_foo/main.go
function main (line 14) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/skip-hidden/initial/lib.go
function Foo (line 9) | func Foo() deptest.Foo {
FILE: cmd/dep/testdata/harness_tests/init/skip-hidden/initial/testdata/main.go
function main (line 14) | func main() {
FILE: cmd/dep/testdata/harness_tests/init/vndr/case1/initial/main.go
function main (line 13) | func main() {
FILE: cmd/dep/testdata/harness_tests/status/case1/dot/initial/main.go
function main (line 12) | func main() {
FILE: cmd/dep/testdata/harness_tests/status/case1/json/initial/main.go
function main (line 12) | func main() {
FILE: cmd/dep/testdata/harness_tests/status/case1/table/initial/main.go
function main (line 12) | func main() {
FILE: cmd/dep/testdata/harness_tests/status/case1/template/initial/main.go
function main (line 12) | func main() {
FILE: cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/status/old_constraints/initial/main.go
function main (line 13) | func main() {
FILE: cmd/dep/testdata/harness_tests/status/override_constraint/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/harness_tests/status/revision_constraint/initial/main.go
function main (line 11) | func main() {
FILE: cmd/dep/testdata/init/directdeps/main.go
function main (line 9) | func main() {}
FILE: cmd/dep/testdata/status/collect_constraints/main.go
type FooBar (line 14) | type FooBar
FILE: cmd/dep/version.go
constant versionHelp (line 20) | versionHelp = `Show the dep version information`
type versionCommand (line 32) | type versionCommand struct
method Name (line 22) | func (cmd *versionCommand) Name() string { return "version" }
method Args (line 23) | func (cmd *versionCommand) Args() string {
method ShortHelp (line 26) | func (cmd *versionCommand) ShortHelp() string { return versionHelp }
method LongHelp (line 27) | func (cmd *versionCommand) LongHelp() string { return versionHelp }
method Hidden (line 28) | func (cmd *versionCommand) Hidden() bool { return false }
method Register (line 30) | func (cmd *versionCommand) Register(fs *flag.FlagSet) {}
method Run (line 34) | func (cmd *versionCommand) Run(ctx *dep.Ctx, args []string) error {
FILE: context.go
type Ctx (line 41) | type Ctx struct
method SetPaths (line 55) | func (c *Ctx) SetPaths(wd string, GOPATHs ...string) error {
method SourceManager (line 99) | func (c *Ctx) SourceManager() (*gps.SourceMgr, error) {
method LoadProject (line 125) | func (c *Ctx) LoadProject() (*Project, error) {
method DetectProjectGOPATH (line 256) | func (c *Ctx) DetectProjectGOPATH(p *Project) (string, error) {
method detectGOPATH (line 298) | func (c *Ctx) detectGOPATH(path string) (string, error) {
method ImportForAbs (line 313) | func (c *Ctx) ImportForAbs(path string) (string, error) {
method AbsForImport (line 335) | func (c *Ctx) AbsForImport(path string) (string, error) {
method ValidateParams (line 348) | func (c *Ctx) ValidateParams(sm gps.SourceManager, params gps.SolvePar...
function defaultGOPATH (line 78) | func defaultGOPATH() string {
function externalImportList (line 216) | func externalImportList(rpt pkgtree.PackageTree, m gps.RootManifest) []s...
FILE: context_test.go
function discardLogger (line 21) | func discardLogger() *log.Logger {
function TestCtx_ProjectImport (line 25) | func TestCtx_ProjectImport(t *testing.T) {
function TestAbsoluteProjectRoot (line 64) | func TestAbsoluteProjectRoot(t *testing.T) {
function TestLoadProject (line 107) | func TestLoadProject(t *testing.T) {
function TestExplicitRootProject (line 155) | func TestExplicitRootProject(t *testing.T) {
function TestLoadProjectNotFoundErrors (line 218) | func TestLoadProjectNotFoundErrors(t *testing.T) {
function TestLoadProjectManifestParseError (line 246) | func TestLoadProjectManifestParseError(t *testing.T) {
function TestLoadProjectLockParseError (line 277) | func TestLoadProjectLockParseError(t *testing.T) {
function TestLoadProjectNoSrcDir (line 308) | func TestLoadProjectNoSrcDir(t *testing.T) {
function TestLoadProjectGopkgFilenames (line 330) | func TestLoadProjectGopkgFilenames(t *testing.T) {
function TestCaseInsensitiveGOPATH (line 381) | func TestCaseInsensitiveGOPATH(t *testing.T) {
function TestDetectProjectGOPATH (line 429) | func TestDetectProjectGOPATH(t *testing.T) {
function TestDetectGOPATH (line 520) | func TestDetectGOPATH(t *testing.T) {
function TestDepCachedir (line 561) | func TestDepCachedir(t *testing.T) {
FILE: gps/_testdata/cmd/echosleep/echosleep.go
function main (line 13) | func main() {
FILE: gps/_testdata/cmd/stdout_stderr/stdout_stderr.go
function main (line 11) | func main() {
FILE: gps/bridge.go
type sourceBridge (line 18) | type sourceBridge interface
type bridge (line 40) | type bridge struct
method GetManifestAndLock (line 80) | func (b *bridge) GetManifestAndLock(id ProjectIdentifier, v Version, a...
method listVersions (line 91) | func (b *bridge) listVersions(id ProjectIdentifier) ([]Version, error) {
method RevisionPresentIn (line 115) | func (b *bridge) RevisionPresentIn(id ProjectIdentifier, r Revision) (...
method SourceExists (line 122) | func (b *bridge) SourceExists(id ProjectIdentifier) (bool, error) {
method vendorCodeExists (line 129) | func (b *bridge) vendorCodeExists(id ProjectIdentifier) (bool, error) {
method ListPackages (line 145) | func (b *bridge) ListPackages(id ProjectIdentifier, v Version) (pkgtre...
method ExportProject (line 156) | func (b *bridge) ExportProject(id ProjectIdentifier, v Version, path s...
method verifyRootDir (line 163) | func (b *bridge) verifyRootDir(path string) error {
method DeduceProjectRoot (line 173) | func (b *bridge) DeduceProjectRoot(ip string) (ProjectRoot, error) {
method breakLock (line 186) | func (b *bridge) breakLock() {
method SyncSourceFor (line 211) | func (b *bridge) SyncSourceFor(id ProjectIdentifier) error {
function mkBridge (line 71) | func mkBridge(s *solver, sm SourceManager, down bool) *bridge {
FILE: gps/cmd.go
method Args (line 11) | func (c cmd) Args() []string {
method SetDir (line 15) | func (c cmd) SetDir(dir string) {
method SetEnv (line 19) | func (c cmd) SetEnv(env []string) {
function init (line 23) | func init() {
FILE: gps/cmd_unix.go
type cmd (line 21) | type cmd struct
method CombinedOutput (line 46) | func (c cmd) CombinedOutput() ([]byte, error) {
function commandContext (line 27) | func commandContext(ctx context.Context, name string, arg ...string) cmd {
FILE: gps/cmd_windows.go
type cmd (line 12) | type cmd struct
function commandContext (line 16) | func commandContext(ctx context.Context, name string, arg ...string) cmd {
FILE: gps/constraint.go
type Constraint (line 26) | type Constraint interface
function constraintFromCache (line 71) | func constraintFromCache(m *pb.Constraint) (Constraint, error) {
function unpairedVersionFromCache (line 90) | func unpairedVersionFromCache(m *pb.Constraint) (UnpairedVersion, error) {
function NewSemverConstraint (line 115) | func NewSemverConstraint(body string) (Constraint, error) {
function NewSemverConstraintIC (line 135) | func NewSemverConstraintIC(body string) (Constraint, error) {
type semverConstraint (line 148) | type semverConstraint struct
method String (line 152) | func (c semverConstraint) String() string {
method ImpliedCaretString (line 162) | func (c semverConstraint) ImpliedCaretString() string {
method typedString (line 166) | func (c semverConstraint) typedString() string {
method Matches (line 170) | func (c semverConstraint) Matches(v Version) bool {
method MatchesAny (line 183) | func (c semverConstraint) MatchesAny(c2 Constraint) bool {
method Intersect (line 187) | func (c semverConstraint) Intersect(c2 Constraint) Constraint {
method identical (line 216) | func (c semverConstraint) identical(c2 Constraint) bool {
method copyTo (line 224) | func (c semverConstraint) copyTo(msg *pb.Constraint) {
function IsAny (line 230) | func IsAny(c Constraint) bool {
function Any (line 236) | func Any() Constraint {
type anyConstraint (line 242) | type anyConstraint struct
method String (line 244) | func (anyConstraint) String() string {
method ImpliedCaretString (line 248) | func (anyConstraint) ImpliedCaretString() string {
method typedString (line 252) | func (anyConstraint) typedString() string {
method Matches (line 256) | func (anyConstraint) Matches(Version) bool {
method MatchesAny (line 260) | func (anyConstraint) MatchesAny(Constraint) bool {
method Intersect (line 264) | func (anyConstraint) Intersect(c Constraint) Constraint {
method identical (line 268) | func (anyConstraint) identical(c Constraint) bool {
method copyTo (line 272) | func (anyConstraint) copyTo(*pb.Constraint) {
type noneConstraint (line 278) | type noneConstraint struct
method String (line 280) | func (noneConstraint) String() string {
method ImpliedCaretString (line 284) | func (noneConstraint) ImpliedCaretString() string {
method typedString (line 288) | func (noneConstraint) typedString() string {
method Matches (line 292) | func (noneConstraint) Matches(Version) bool {
method MatchesAny (line 296) | func (noneConstraint) MatchesAny(Constraint) bool {
method Intersect (line 300) | func (noneConstraint) Intersect(Constraint) Constraint {
method identical (line 304) | func (noneConstraint) identical(c Constraint) bool {
method copyTo (line 309) | func (noneConstraint) copyTo(*pb.Constraint) {
type ProjectConstraint (line 316) | type ProjectConstraint struct
type ProjectConstraints (line 327) | type ProjectConstraints
method overrideAll (line 370) | func (m ProjectConstraints) overrideAll(pcm ProjectConstraints) (out [...
method override (line 387) | func (m ProjectConstraints) override(pr ProjectRoot, pp ProjectPropert...
type workingConstraint (line 329) | type workingConstraint struct
function pcSliceToMap (line 335) | func pcSliceToMap(l []ProjectConstraint, r ...[]ProjectConstraint) Proje...
FILE: gps/constraint_test.go
function gu (line 18) | func gu(v Constraint) string {
function TestBranchConstraintOps (line 22) | func TestBranchConstraintOps(t *testing.T) {
function TestVersionConstraintOps (line 203) | func TestVersionConstraintOps(t *testing.T) {
function TestSemverVersionConstraintOps (line 384) | func TestSemverVersionConstraintOps(t *testing.T) {
function TestSemverConstraintOps (line 584) | func TestSemverConstraintOps(t *testing.T) {
function TestSemverConstraint_ImpliedCaret (line 678) | func TestSemverConstraint_ImpliedCaret(t *testing.T) {
function TestTypedConstraintString (line 700) | func TestTypedConstraintString(t *testing.T) {
function TestConstraintsIdentical (line 755) | func TestConstraintsIdentical(t *testing.T) {
function testSemverConstraint (line 781) | func testSemverConstraint(t *testing.T, body string) Constraint {
function TestConstraintEncoding (line 789) | func TestConstraintEncoding(t *testing.T) {
FILE: gps/deduce.go
constant gopkgUnstableSuffix (line 37) | gopkgUnstableSuffix = "-unstable"
function validateVCSScheme (line 39) | func validateVCSScheme(scheme, typ string) bool {
function pathDeducerTrie (line 91) | func pathDeducerTrie() *deducerTrie {
type pathDeducer (line 105) | type pathDeducer interface
type githubDeducer (line 116) | type githubDeducer struct
method deduceRoot (line 120) | func (m githubDeducer) deduceRoot(path string) (string, error) {
method deduceSource (line 129) | func (m githubDeducer) deduceSource(path string, u *url.URL) (maybeSou...
type bitbucketDeducer (line 163) | type bitbucketDeducer struct
method deduceRoot (line 167) | func (m bitbucketDeducer) deduceRoot(path string) (string, error) {
method deduceSource (line 176) | func (m bitbucketDeducer) deduceSource(path string, u *url.URL) (maybe...
type gopkginDeducer (line 245) | type gopkginDeducer struct
method deduceRoot (line 249) | func (m gopkginDeducer) deduceRoot(p string) (string, error) {
method parseAndValidatePath (line 258) | func (m gopkginDeducer) parseAndValidatePath(p string) ([]string, erro...
method deduceSource (line 274) | func (m gopkginDeducer) deduceSource(p string, u *url.URL) (maybeSourc...
type launchpadDeducer (line 323) | type launchpadDeducer struct
method deduceRoot (line 327) | func (m launchpadDeducer) deduceRoot(path string) (string, error) {
method deduceSource (line 338) | func (m launchpadDeducer) deduceSource(path string, u *url.URL) (maybe...
type launchpadGitDeducer (line 364) | type launchpadGitDeducer struct
method deduceRoot (line 368) | func (m launchpadGitDeducer) deduceRoot(path string) (string, error) {
method deduceSource (line 378) | func (m launchpadGitDeducer) deduceSource(path string, u *url.URL) (ma...
type jazzDeducer (line 404) | type jazzDeducer struct
method deduceRoot (line 408) | func (m jazzDeducer) deduceRoot(path string) (string, error) {
method deduceSource (line 417) | func (m jazzDeducer) deduceSource(path string, u *url.URL) (maybeSourc...
type apacheDeducer (line 437) | type apacheDeducer struct
method deduceRoot (line 441) | func (m apacheDeducer) deduceRoot(path string) (string, error) {
method deduceSource (line 450) | func (m apacheDeducer) deduceSource(path string, u *url.URL) (maybeSou...
type vcsExtensionDeducer (line 476) | type vcsExtensionDeducer struct
method deduceRoot (line 480) | func (m vcsExtensionDeducer) deduceRoot(path string) (string, error) {
method deduceSource (line 489) | func (m vcsExtensionDeducer) deduceSource(path string, u *url.URL) (ma...
type deducer (line 559) | type deducer interface
type deductionCoordinator (line 563) | type deductionCoordinator struct
method deduceRootPath (line 587) | func (dc *deductionCoordinator) deduceRootPath(ctx context.Context, pa...
method deduceKnownPaths (line 666) | func (dc *deductionCoordinator) deduceKnownPaths(path string) (pathDed...
function newDeductionCoordinator (line 570) | func newDeductionCoordinator(superv *supervisor) *deductionCoordinator {
type pathDeduction (line 659) | type pathDeduction struct
type httpMetadataDeducer (line 706) | type httpMetadataDeducer struct
method deduce (line 715) | func (hmd *httpMetadataDeducer) deduce(ctx context.Context, path strin...
function normalizeURI (line 798) | func normalizeURI(p string) (*url.URL, string, error) {
function fetchMetadata (line 833) | func fetchMetadata(ctx context.Context, path, scheme string) (rc io.Read...
function doFetchMetadata (line 848) | func doFetchMetadata(ctx context.Context, scheme, path string) (io.ReadC...
type netrcLine (line 873) | type netrcLine struct
function parseNetrc (line 879) | func parseNetrc(data string) []netrcLine {
function netrcPath (line 929) | func netrcPath() (string, error) {
function readNetrc (line 944) | func readNetrc() {
function addAuthFromNetrc (line 960) | func addAuthFromNetrc(rawurl string, req *http.Request) *http.Request {
function getMetadata (line 982) | func getMetadata(ctx context.Context, path, scheme string) (string, stri...
FILE: gps/deduce_test.go
type pathDeductionFixture (line 17) | type pathDeductionFixture struct
function mkurl (line 26) | func mkurl(s string) (u *url.URL) {
function TestDeduceFromPath (line 506) | func TestDeduceFromPath(t *testing.T) {
function TestVanityDeduction (line 606) | func TestVanityDeduction(t *testing.T) {
function TestVanityDeductionSchemeMismatch (line 668) | func TestVanityDeductionSchemeMismatch(t *testing.T) {
FILE: gps/discovery.go
function charsetReader (line 23) | func charsetReader(charset string, input io.Reader) (io.Reader, error) {
type metaImport (line 32) | type metaImport struct
function parseMetaGoImports (line 41) | func parseMetaGoImports(r io.Reader) (imports []metaImport, err error) {
function attrValue (line 83) | func attrValue(attrs []xml.Attr, name string) string {
FILE: gps/error.go
type errorSlice (line 12) | type errorSlice
method Error (line 14) | func (errs errorSlice) Error() string {
method Format (line 23) | func (errs errorSlice) Format(f fmt.State, c rune) {
FILE: gps/example.go
function main (line 29) | func main() {
type NaiveAnalyzer (line 65) | type NaiveAnalyzer struct
method DeriveManifestAndLock (line 71) | func (a NaiveAnalyzer) DeriveManifestAndLock(path string, n gps.Projec...
method Info (line 77) | func (a NaiveAnalyzer) Info() gps.ProjectAnalyzerInfo {
FILE: gps/filesystem.go
type fsLink (line 16) | type fsLink struct
type filesystemState (line 30) | type filesystemState struct
method setup (line 37) | func (s filesystemState) setup() error {
function deriveFilesystemState (line 86) | func deriveFilesystemState(root string) (filesystemState, error) {
FILE: gps/filesystem_test.go
type fsTestCase (line 19) | type fsTestCase struct
method assert (line 25) | func (tc fsTestCase) assert(t *testing.T) {
method setup (line 95) | func (tc fsTestCase) setup(t *testing.T) {
function TestDeriveFilesystemState (line 101) | func TestDeriveFilesystemState(t *testing.T) {
FILE: gps/identifier.go
type ProjectRoot (line 41) | type ProjectRoot
type ProjectIdentifier (line 78) | type ProjectIdentifier struct
method Less (line 84) | func (i ProjectIdentifier) Less(j ProjectIdentifier) bool {
method eq (line 94) | func (i ProjectIdentifier) eq(j ProjectIdentifier) bool {
method equiv (line 122) | func (i ProjectIdentifier) equiv(j ProjectIdentifier) bool {
method normalizedSource (line 137) | func (i ProjectIdentifier) normalizedSource() string {
method String (line 144) | func (i ProjectIdentifier) String() string {
method normalize (line 151) | func (i ProjectIdentifier) normalize() ProjectIdentifier {
type ProjectProperties (line 165) | type ProjectProperties struct
type bimodalIdentifier (line 171) | type bimodalIdentifier struct
type atom (line 182) | type atom struct
type atomWithPackages (line 192) | type atomWithPackages struct
method bmi (line 202) | func (awp atomWithPackages) bmi() bimodalIdentifier {
type completeDep (line 213) | type completeDep struct
type dependency (line 223) | type dependency struct
FILE: gps/internal/pb/source_cache.pb.go
constant _ (line 30) | _ = proto.ProtoPackageIsVersion2
type Constraint_Type (line 32) | type Constraint_Type
method String (line 57) | func (x Constraint_Type) String() string {
method EnumDescriptor (line 60) | func (Constraint_Type) EnumDescriptor() ([]byte, []int) { return fileD...
constant Constraint_Revision (line 35) | Constraint_Revision Constraint_Type = 0
constant Constraint_Branch (line 36) | Constraint_Branch Constraint_Type = 1
constant Constraint_DefaultBranch (line 37) | Constraint_DefaultBranch Constraint_Type = 2
constant Constraint_Version (line 38) | Constraint_Version Constraint_Type = 3
constant Constraint_Semver (line 39) | Constraint_Semver Constraint_Type = 4
type Constraint (line 63) | type Constraint struct
method Reset (line 68) | func (m *Constraint) Reset() { *m = Constraint{} }
method String (line 69) | func (m *Constraint) String() string { return proto.Compact...
method ProtoMessage (line 70) | func (*Constraint) ProtoMessage() {}
method Descriptor (line 71) | func (*Constraint) Descriptor() ([]byte, []int) { return fileDescripto...
method GetType (line 73) | func (m *Constraint) GetType() Constraint_Type {
method GetValue (line 80) | func (m *Constraint) GetValue() string {
type ProjectProperties (line 88) | type ProjectProperties struct
method Reset (line 94) | func (m *ProjectProperties) Reset() { *m = ProjectP...
method String (line 95) | func (m *ProjectProperties) String() string { return proto....
method ProtoMessage (line 96) | func (*ProjectProperties) ProtoMessage() {}
method Descriptor (line 97) | func (*ProjectProperties) Descriptor() ([]byte, []int) { return fileDe...
method GetRoot (line 99) | func (m *ProjectProperties) GetRoot() string {
method GetSource (line 106) | func (m *ProjectProperties) GetSource() string {
method GetConstraint (line 113) | func (m *ProjectProperties) GetConstraint() *Constraint {
type LockedProject (line 121) | type LockedProject struct
method Reset (line 129) | func (m *LockedProject) Reset() { *m = LockedProjec...
method String (line 130) | func (m *LockedProject) String() string { return proto.Comp...
method ProtoMessage (line 131) | func (*LockedProject) ProtoMessage() {}
method Descriptor (line 132) | func (*LockedProject) Descriptor() ([]byte, []int) { return fileDescri...
method GetRoot (line 134) | func (m *LockedProject) GetRoot() string {
method GetSource (line 141) | func (m *LockedProject) GetSource() string {
method GetUnpairedVersion (line 148) | func (m *LockedProject) GetUnpairedVersion() *Constraint {
method GetRevision (line 155) | func (m *LockedProject) GetRevision() string {
method GetPackages (line 162) | func (m *LockedProject) GetPackages() []string {
function init (line 169) | func init() {
function init (line 176) | func init() { proto.RegisterFile("source_cache.proto", fileDescriptor0) }
FILE: gps/lock.go
type Lock (line 19) | type Lock interface
function sortLockedProjects (line 30) | func sortLockedProjects(lps []LockedProject) []LockedProject {
type LockedProject (line 48) | type LockedProject interface
type lockedProject (line 57) | type lockedProject struct
method Ident (line 121) | func (lp lockedProject) Ident() ProjectIdentifier {
method Version (line 127) | func (lp lockedProject) Version() Version {
method Eq (line 141) | func (lp lockedProject) Eq(lp2 LockedProject) bool {
method Packages (line 198) | func (lp lockedProject) Packages() []string {
method String (line 202) | func (lp lockedProject) String() string {
type SimpleLock (line 66) | type SimpleLock
method Projects (line 71) | func (l SimpleLock) Projects() []LockedProject {
method InputImports (line 77) | func (l SimpleLock) InputImports() []string {
function NewLockedProject (line 91) | func NewLockedProject(id ProjectIdentifier, v Version, pkgs []string) Lo...
type safeLock (line 207) | type safeLock struct
method InputImports (line 212) | func (sl safeLock) InputImports() []string {
method Projects (line 216) | func (sl safeLock) Projects() []LockedProject {
function prepLock (line 225) | func prepLock(l Lock) safeLock {
FILE: gps/lock_test.go
function TestLockedProjectSorting (line 13) | func TestLockedProjectSorting(t *testing.T) {
function TestLockedProjectsEq (line 35) | func TestLockedProjectsEq(t *testing.T) {
function TestLockedProjectsString (line 86) | func TestLockedProjectsString(t *testing.T) {
FILE: gps/manager_test.go
type naiveAnalyzer (line 30) | type naiveAnalyzer struct
method DeriveManifestAndLock (line 32) | func (naiveAnalyzer) DeriveManifestAndLock(string, ProjectRoot) (Manif...
method Info (line 36) | func (a naiveAnalyzer) Info() ProjectAnalyzerInfo {
function mkNaiveSM (line 43) | func mkNaiveSM(t *testing.T) (*SourceMgr, func()) {
function remakeNaiveSM (line 66) | func remakeNaiveSM(osm *SourceMgr, t *testing.T) (*SourceMgr, func()) {
function TestSourceManagerInit (line 87) | func TestSourceManagerInit(t *testing.T) {
function TestSourceInit (line 143) | func TestSourceInit(t *testing.T) {
function TestDefaultBranchAssignment (line 279) | func TestDefaultBranchAssignment(t *testing.T) {
function TestMgrMethodsFailWithBadPath (line 324) | func TestMgrMethodsFailWithBadPath(t *testing.T) {
type sourceCreationTestFixture (line 354) | type sourceCreationTestFixture struct
method run (line 359) | func (f sourceCreationTestFixture) run(t *testing.T) {
function TestSourceCreationCounts (line 406) | func TestSourceCreationCounts(t *testing.T) {
function TestGetSources (line 449) | func TestGetSources(t *testing.T) {
function TestFSCaseSensitivityConvergesSources (line 516) | func TestFSCaseSensitivityConvergesSources(t *testing.T) {
function TestGetInfoListVersionsOrdering (line 571) | func TestGetInfoListVersionsOrdering(t *testing.T) {
function TestDeduceProjectRoot (line 599) | func TestDeduceProjectRoot(t *testing.T) {
function TestMultiFetchThreadsafe (line 675) | func TestMultiFetchThreadsafe(t *testing.T) {
function TestListVersionsRacey (line 782) | func TestListVersionsRacey(t *testing.T) {
function TestErrAfterRelease (line 807) | func TestErrAfterRelease(t *testing.T) {
function TestSignalHandling (line 869) | func TestSignalHandling(t *testing.T) {
function TestUnreachableSource (line 936) | func TestUnreachableSource(t *testing.T) {
function TestSupervisor (line 953) | func TestSupervisor(t *testing.T) {
FILE: gps/manifest.go
type Manifest (line 21) | type Manifest interface
type RootManifest (line 28) | type RootManifest interface
type SimpleManifest (line 68) | type SimpleManifest struct
method DependencyConstraints (line 75) | func (m SimpleManifest) DependencyConstraints() ProjectConstraints {
type simpleRootManifest (line 81) | type simpleRootManifest struct
method DependencyConstraints (line 87) | func (m simpleRootManifest) DependencyConstraints() ProjectConstraints {
method Overrides (line 90) | func (m simpleRootManifest) Overrides() ProjectConstraints {
method IgnoredPackages (line 93) | func (m simpleRootManifest) IgnoredPackages() *pkgtree.IgnoredRuleset {
method RequiredPackages (line 96) | func (m simpleRootManifest) RequiredPackages() map[string]bool {
function prepManifest (line 106) | func prepManifest(m Manifest) SimpleManifest {
FILE: gps/manifest_test.go
function TestPrepManifest (line 10) | func TestPrepManifest(t *testing.T) {
FILE: gps/maybe_source.go
type maybeSource (line 24) | type maybeSource interface
type maybeSources (line 31) | type maybeSources
method possibleURLs (line 33) | func (mbs maybeSources) possibleURLs() []*url.URL {
function sourceCachePath (line 42) | func sourceCachePath(cacheDir, sourceURL string) string {
type maybeGitSource (line 46) | type maybeGitSource struct
method try (line 50) | func (m maybeGitSource) try(ctx context.Context, cachedir string) (sou...
method URL (line 70) | func (m maybeGitSource) URL() *url.URL {
method String (line 74) | func (m maybeGitSource) String() string {
type maybeGopkginSource (line 78) | type maybeGopkginSource struct
method try (line 92) | func (m maybeGopkginSource) try(ctx context.Context, cachedir string) ...
method URL (line 121) | func (m maybeGopkginSource) URL() *url.URL {
method String (line 128) | func (m maybeGopkginSource) String() string {
type maybeBzrSource (line 132) | type maybeBzrSource struct
method try (line 136) | func (m maybeBzrSource) try(ctx context.Context, cachedir string) (sou...
method URL (line 156) | func (m maybeBzrSource) URL() *url.URL {
method String (line 160) | func (m maybeBzrSource) String() string {
type maybeHgSource (line 164) | type maybeHgSource struct
method try (line 168) | func (m maybeHgSource) try(ctx context.Context, cachedir string) (sour...
method URL (line 188) | func (m maybeHgSource) URL() *url.URL {
method String (line 192) | func (m maybeHgSource) String() string {
function ufmt (line 198) | func ufmt(u *url.URL) string {
FILE: gps/maybe_source_test.go
function TestMaybeGitSource_try (line 21) | func TestMaybeGitSource_try(t *testing.T) {
function TestMaybeGitSource_try_recovery (line 46) | func TestMaybeGitSource_try_recovery(t *testing.T) {
function untar (line 98) | func untar(dst string, r io.Reader) error {
FILE: gps/metrics.go
type metrics (line 16) | type metrics struct
method push (line 32) | func (m *metrics) push(name string) {
method pop (line 40) | func (m *metrics) pop() {
method dump (line 48) | func (m *metrics) dump(l *log.Logger) {
function newMetrics (line 22) | func newMetrics() *metrics {
type ndpair (line 75) | type ndpair struct
type ndpairs (line 80) | type ndpairs
method Less (line 82) | func (s ndpairs) Less(i, j int) bool { return s[i].d < s[j].d }
method Swap (line 83) | func (s ndpairs) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
method Len (line 84) | func (s ndpairs) Len() int { return len(s) }
FILE: gps/paths/paths.go
function IsStandardImportPath (line 14) | func IsStandardImportPath(path string) bool {
FILE: gps/paths/paths_test.go
function TestIsStandardImportPath (line 13) | func TestIsStandardImportPath(t *testing.T) {
FILE: gps/pkgtree/ignored_ruleset.go
type IgnoredRuleset (line 16) | type IgnoredRuleset struct
method IsIgnored (line 71) | func (ir *IgnoredRuleset) IsIgnored(path string) bool {
method Len (line 81) | func (ir *IgnoredRuleset) Len() int {
method ToSlice (line 92) | func (ir *IgnoredRuleset) ToSlice() []string {
function NewIgnoredRuleset (line 27) | func NewIgnoredRuleset(ig []string) *IgnoredRuleset {
FILE: gps/pkgtree/ignored_ruleset_test.go
function TestIgnoredRuleset (line 9) | func TestIgnoredRuleset(t *testing.T) {
FILE: gps/pkgtree/pkgtree.go
type Package (line 25) | type Package struct
function ListPackages (line 64) | func ListPackages(fileRoot, importRoot string) (PackageTree, error) {
function fillPackage (line 212) | func fillPackage(p *build.Package) error {
function findImportComment (line 330) | func findImportComment(pkgName *ast.Ident, c *ast.CommentGroup) string {
type ConflictingImportComments (line 367) | type ConflictingImportComments struct
method Error (line 372) | func (e *ConflictingImportComments) Error() string {
type NonCanonicalImportRoot (line 379) | type NonCanonicalImportRoot struct
method Error (line 384) | func (e *NonCanonicalImportRoot) Error() string {
function quotedPaths (line 389) | func quotedPaths(ps []string) string {
type LocalImportsError (line 401) | type LocalImportsError struct
method Error (line 407) | func (e *LocalImportsError) Error() string {
type wm (line 419) | type wm struct
type PackageOrErr (line 427) | type PackageOrErr struct
type ProblemImportError (line 434) | type ProblemImportError struct
method Error (line 449) | func (e *ProblemImportError) Error() string {
function missingPkgErr (line 461) | func missingPkgErr(pkg string) error {
type PackageTree (line 469) | type PackageTree struct
method ToReachMap (line 547) | func (t PackageTree) ToReachMap(main, tests, backprop bool, ignore *Ig...
method Copy (line 608) | func (t PackageTree) Copy() PackageTree {
method TrimHiddenPackages (line 679) | func (t PackageTree) TrimHiddenPackages(main, tests bool, ignore *Igno...
function CopyPackages (line 616) | func CopyPackages(p map[string]PackageOrErr, fn func(string, PackageOrEr...
function wmToReach (line 719) | func wmToReach(workmap map[string]wm, backprop bool) (ReachMap, map[stri...
function eqOrSlashedPrefix (line 1057) | func eqOrSlashedPrefix(s, prefix string) bool {
function dedupeStrings (line 1067) | func dedupeStrings(s1, s2 []string) (r []string) {
function uniq (line 1092) | func uniq(a []string) []string {
FILE: gps/pkgtree/pkgtree_test.go
function TestWorkmapToReach (line 33) | func TestWorkmapToReach(t *testing.T) {
function TestListPackagesNoDir (line 564) | func TestListPackagesNoDir(t *testing.T) {
function TestListPackages (line 574) | func TestListPackages(t *testing.T) {
function TestTrimHiddenPackages (line 1631) | func TestTrimHiddenPackages(t *testing.T) {
function TestListPackagesNoPerms (line 1739) | func TestListPackagesNoPerms(t *testing.T) {
function TestToReachMap (line 1822) | func TestToReachMap(t *testing.T) {
function TestFlattenReachMap (line 2082) | func TestFlattenReachMap(t *testing.T) {
type flattenReachMapCase (line 2287) | type flattenReachMapCase struct
function testFlattenReachMap (line 2295) | func testFlattenReachMap(ptree *PackageTree, testCase *flattenReachMapCa...
function TestToReachMapCycle (line 2310) | func TestToReachMapCycle(t *testing.T) {
function TestToReachMapFilterDot (line 2331) | func TestToReachMapFilterDot(t *testing.T) {
function getTestdataRootDir (line 2350) | func getTestdataRootDir(t *testing.T) string {
function TestCanaryPackageTreeCopy (line 2360) | func TestCanaryPackageTreeCopy(t *testing.T) {
function TestPackageTreeCopy (line 2393) | func TestPackageTreeCopy(t *testing.T) {
FILE: gps/pkgtree/reachmap.go
type ReachMap (line 17) | type ReachMap
method FlattenFn (line 41) | func (rm ReachMap) FlattenFn(exclude func(string) bool) []string {
function pkgFilter (line 26) | func pkgFilter(pkg string) bool {
FILE: gps/prune.go
type PruneOptions (line 20) | type PruneOptions
method String (line 84) | func (po PruneOptions) String() string {
constant PruneNestedVendorDirs (line 24) | PruneNestedVendorDirs PruneOptions = 1 << iota
constant PruneUnusedPackages (line 26) | PruneUnusedPackages
constant PruneNonGoFiles (line 30) | PruneNonGoFiles
constant PruneGoTestFiles (line 32) | PruneGoTestFiles
type PruneOptionSet (line 45) | type PruneOptionSet struct
type CascadingPruneOptions (line 57) | type CascadingPruneOptions struct
method PruneOptionsFor (line 108) | func (o CascadingPruneOptions) PruneOptionsFor(pr ProjectRoot) PruneOp...
function ParsePruneOptions (line 64) | func ParsePruneOptions(input string) (PruneOptions, error) {
function defaultCascadingPruneOptions (line 150) | func defaultCascadingPruneOptions() CascadingPruneOptions {
function PruneProject (line 183) | func PruneProject(baseDir string, lp LockedProject, options PruneOptions...
function pruneVendorDirs (line 222) | func pruneVendorDirs(fsState filesystemState) error {
function pruneUnusedPackages (line 246) | func pruneUnusedPackages(lp LockedProject, fsState filesystemState) (map...
function calculateUnusedPackages (line 260) | func calculateUnusedPackages(lp LockedProject, fsState filesystemState) ...
function collectUnusedPackagesFiles (line 286) | func collectUnusedPackagesFiles(fsState filesystemState, unusedPackages ...
function isSourceFile (line 306) | func isSourceFile(path string) bool {
function pruneNonGoFiles (line 340) | func pruneNonGoFiles(fsState filesystemState) error {
function isPreservedFile (line 368) | func isPreservedFile(name string) bool {
function pruneGoTestFiles (line 391) | func pruneGoTestFiles(fsState filesystemState) error {
function deleteEmptyDirs (line 409) | func deleteEmptyDirs(fsState filesystemState) error {
function fileExt (line 430) | func fileExt(name string) string {
FILE: gps/prune_test.go
function TestCascadingPruneOptions (line 15) | func TestCascadingPruneOptions(t *testing.T) {
function TestPruneProject (line 106) | func TestPruneProject(t *testing.T) {
function TestPruneUnusedPackages (line 129) | func TestPruneUnusedPackages(t *testing.T) {
function TestPruneNonGoFiles (line 264) | func TestPruneNonGoFiles(t *testing.T) {
function TestPruneGoTestFiles (line 359) | func TestPruneGoTestFiles(t *testing.T) {
function TestPruneVendorDirs (line 456) | func TestPruneVendorDirs(t *testing.T) {
function pruneVendorDirsTestCase (line 666) | func pruneVendorDirsTestCase(tc fsTestCase) func(*testing.T) {
function TestDeleteEmptyDirs (line 696) | func TestDeleteEmptyDirs(t *testing.T) {
FILE: gps/rootdata.go
type rootdata (line 16) | type rootdata struct
method externalImportList (line 56) | func (rd rootdata) externalImportList(stdLibFn func(string) bool) []st...
method getApplicableConstraints (line 82) | func (rd rootdata) getApplicableConstraints(stdLibFn func(string) bool...
method combineConstraints (line 140) | func (rd rootdata) combineConstraints() []workingConstraint {
method needVersionsFor (line 152) | func (rd rootdata) needVersionsFor(pr ProjectRoot) bool {
method isRoot (line 175) | func (rd rootdata) isRoot(pr ProjectRoot) bool {
method rootAtom (line 180) | func (rd rootdata) rootAtom() atomWithPackages {
FILE: gps/rootdata_test.go
function TestRootdataExternalImports (line 14) | func TestRootdataExternalImports(t *testing.T) {
function TestGetApplicableConstraints (line 69) | func TestGetApplicableConstraints(t *testing.T) {
FILE: gps/satisfy.go
method check (line 13) | func (s *solver) check(a atomWithPackages, pkgonly bool) error {
method checkAtomAllowable (line 81) | func (s *solver) checkAtomAllowable(pa atom) error {
method checkRequiredPackagesExist (line 108) | func (s *solver) checkRequiredPackagesExist(a atomWithPackages) error {
method checkDepsConstraintsAllowable (line 148) | func (s *solver) checkDepsConstraintsAllowable(a atomWithPackages, cdep ...
method checkDepsDisallowsSelected (line 181) | func (s *solver) checkDepsDisallowsSelected(a atomWithPackages, cdep com...
method checkIdentMatches (line 202) | func (s *solver) checkIdentMatches(a atomWithPackages, cdep completeDep)...
method checkRootCaseConflicts (line 229) | func (s *solver) checkRootCaseConflicts(a atomWithPackages, cdep complet...
method checkPackageImportsFromDepExist (line 277) | func (s *solver) checkPackageImportsFromDepExist(a atomWithPackages, cde...
method checkRevisionExists (line 318) | func (s *solver) checkRevisionExists(a atomWithPackages, cdep completeDe...
FILE: gps/selection.go
type selection (line 7) | type selection struct
method getDependenciesOn (line 26) | func (s *selection) getDependenciesOn(id ProjectIdentifier) []dependen...
method getIdentFor (line 39) | func (s *selection) getIdentFor(pr ProjectRoot) (ProjectIdentifier, bo...
method pushSelection (line 53) | func (s *selection) pushSelection(a atomWithPackages, pkgonly bool) {
method popSelection (line 64) | func (s *selection) popSelection() (atomWithPackages, bool) {
method findCaseConflicts (line 73) | func (s *selection) findCaseConflicts(pr ProjectRoot) (bool, ProjectRo...
method pushDep (line 81) | func (s *selection) pushDep(dep dependency) {
method popDep (line 91) | func (s *selection) popDep(id ProjectIdentifier) (dep dependency) {
method depperCount (line 102) | func (s *selection) depperCount(id ProjectIdentifier) int {
method getRequiredPackagesIn (line 108) | func (s *selection) getRequiredPackagesIn(id ProjectIdentifier) map[st...
method getSelectedPackagesIn (line 129) | func (s *selection) getSelectedPackagesIn(id ProjectIdentifier) map[st...
method getProjectImportMap (line 147) | func (s *selection) getProjectImportMap() map[ProjectRoot]map[string]s...
method getConstraint (line 168) | func (s *selection) getConstraint(id ProjectIdentifier) Constraint {
method selected (line 197) | func (s *selection) selected(id ProjectIdentifier) (atomWithPackages, ...
type selected (line 21) | type selected struct
type unselected (line 207) | type unselected struct
method Len (line 212) | func (u unselected) Len() int {
method Less (line 216) | func (u unselected) Less(i, j int) bool {
method Swap (line 220) | func (u unselected) Swap(i, j int) {
method Push (line 224) | func (u *unselected) Push(x interface{}) {
method Pop (line 228) | func (u *unselected) Pop() (v interface{}) {
method remove (line 243) | func (u *unselected) remove(bmi bimodalIdentifier) {
FILE: gps/selection_test.go
function TestUnselectedRemoval (line 13) | func TestUnselectedRemoval(t *testing.T) {
FILE: gps/solution.go
type Solution (line 20) | type Solution interface
type solution (line 33) | type solution struct
method Projects (line 152) | func (r solution) Projects() []LockedProject {
method InputImports (line 156) | func (r solution) InputImports() []string {
method Attempts (line 160) | func (r solution) Attempts() int {
method AnalyzerName (line 164) | func (r solution) AnalyzerName() string {
method AnalyzerVersion (line 168) | func (r solution) AnalyzerVersion() int {
method SolverName (line 172) | func (r solution) SolverName() string {
method SolverVersion (line 176) | func (r solution) SolverVersion() int {
type WriteProgress (line 51) | type WriteProgress struct
method String (line 58) | func (p WriteProgress) String() string {
constant concurrentWriters (line 66) | concurrentWriters = 16
function WriteDepTree (line 78) | func WriteDepTree(basedir string, l Lock, sm SourceManager, co Cascading...
FILE: gps/solution_test.go
function pi (line 21) | func pi(n string) ProjectIdentifier {
function init (line 27) | func init() {
function testWriteDepTree (line 44) | func testWriteDepTree(t *testing.T) {
function BenchmarkCreateVendorTree (line 120) | func BenchmarkCreateVendorTree(b *testing.B) {
FILE: gps/solve_basic_test.go
function nvSplit (line 25) | func nvSplit(info string) (id ProjectIdentifier, version string) {
function nvrSplit (line 48) | func nvrSplit(info string) (id ProjectIdentifier, version string, revisi...
function mkAtom (line 84) | func mkAtom(info string) atom {
function mkPCstrnt (line 138) | func mkPCstrnt(info string) ProjectConstraint {
function mkCDep (line 182) | func mkCDep(pdep string, pl ...string) completeDep {
type depspec (line 195) | type depspec struct
method DependencyConstraints (line 1556) | func (ds depspec) DependencyConstraints() ProjectConstraints {
function mkDepspec (line 209) | func mkDepspec(pi string, deps ...string) depspec {
function mkDep (line 227) | func mkDep(atom, pdep string, pl ...string) dependency {
function mkADep (line 234) | func mkADep(atom, pdep string, c Constraint, pl ...string) dependency {
function mkPI (line 254) | func mkPI(root string) ProjectIdentifier {
function mkSVC (line 261) | func mkSVC(body string) Constraint {
function mklock (line 270) | func mklock(pairs ...string) fixLock {
function mkrevlock (line 282) | func mkrevlock(pairs ...string) fixLock {
function mksolution (line 303) | func mksolution(inputs ...interface{}) map[ProjectIdentifier]LockedProje...
function mklp (line 321) | func mklp(pair string, pkgs ...string) LockedProject {
function computeBasicReachMap (line 331) | func computeBasicReachMap(ds []depspec) reachMap {
type pident (line 354) | type pident struct
type specfix (line 359) | type specfix interface
type basicFixture (line 383) | type basicFixture struct
method name (line 409) | func (f basicFixture) name() string {
method specs (line 413) | func (f basicFixture) specs() []depspec {
method maxTries (line 417) | func (f basicFixture) maxTries() int {
method solution (line 421) | func (f basicFixture) solution() map[ProjectIdentifier]LockedProject {
method rootmanifest (line 425) | func (f basicFixture) rootmanifest() RootManifest {
method rootTree (line 432) | func (f basicFixture) rootTree() pkgtree.PackageTree {
method failure (line 455) | func (f basicFixture) failure() error {
function init (line 1253) | func init() {
type reachMap (line 1290) | type reachMap
type depspecSourceManager (line 1292) | type depspecSourceManager struct
method GetManifestAndLock (line 1322) | func (sm *depspecSourceManager) GetManifestAndLock(id ProjectIdentifie...
method ListPackages (line 1343) | func (sm *depspecSourceManager) ListPackages(id ProjectIdentifier, v V...
method ListVersions (line 1392) | func (sm *depspecSourceManager) ListVersions(id ProjectIdentifier) ([]...
method RevisionPresentIn (line 1421) | func (sm *depspecSourceManager) RevisionPresentIn(id ProjectIdentifier...
method SourceExists (line 1432) | func (sm *depspecSourceManager) SourceExists(id ProjectIdentifier) (bo...
method SyncSourceFor (line 1443) | func (sm *depspecSourceManager) SyncSourceFor(id ProjectIdentifier) er...
method Release (line 1451) | func (sm *depspecSourceManager) Release() {}
method ExportProject (line 1453) | func (sm *depspecSourceManager) ExportProject(context.Context, Project...
method ExportPrunedProject (line 1457) | func (sm *depspecSourceManager) ExportPrunedProject(context.Context, L...
method DeduceProjectRoot (line 1461) | func (sm *depspecSourceManager) DeduceProjectRoot(ip string) (ProjectR...
method SourceURLsForPath (line 1472) | func (sm *depspecSourceManager) SourceURLsForPath(ip string) ([]*url.U...
method rootSpec (line 1476) | func (sm *depspecSourceManager) rootSpec() depspec {
method allSpecs (line 1480) | func (sm *depspecSourceManager) allSpecs() []depspec {
method ignore (line 1484) | func (sm *depspecSourceManager) ignore() map[string]bool {
method InferConstraint (line 1493) | func (sm *depspecSourceManager) InferConstraint(s string, pi ProjectId...
type fixSM (line 1298) | type fixSM interface
function newdepspecSM (line 1307) | func newdepspecSM(ds []depspec, ignore []string) *depspecSourceManager {
type depspecBridge (line 1497) | type depspecBridge struct
method listVersions (line 1501) | func (b *depspecBridge) listVersions(id ProjectIdentifier) ([]Version,...
method verifyRootDir (line 1533) | func (b *depspecBridge) verifyRootDir(path string) error {
method ListPackages (line 1542) | func (b *depspecBridge) ListPackages(id ProjectIdentifier, v Version) ...
method vendorCodeExists (line 1546) | func (b *depspecBridge) vendorCodeExists(id ProjectIdentifier) (bool, ...
type fixLock (line 1560) | type fixLock
method Projects (line 1563) | func (l fixLock) Projects() []LockedProject {
method InputImports (line 1568) | func (fixLock) InputImports() []string {
type dummyLock (line 1572) | type dummyLock struct
method Projects (line 1575) | func (dummyLock) Projects() []LockedProject {
method InputImports (line 1580) | func (dummyLock) InputImports() []string {
FILE: gps/solve_bimodal_test.go
function dsp (line 18) | func dsp(ds depspec, pkgs ...tpkg) depspec {
function pkg (line 24) | func pkg(path string, imports ...string) tpkg {
function init (line 31) | func init() {
type tpkg (line 1290) | type tpkg struct
type bimodalFixture (line 1297) | type bimodalFixture struct
method name (line 1328) | func (f bimodalFixture) name() string {
method specs (line 1332) | func (f bimodalFixture) specs() []depspec {
method maxTries (line 1336) | func (f bimodalFixture) maxTries() int {
method solution (line 1340) | func (f bimodalFixture) solution() map[ProjectIdentifier]LockedProject {
method rootmanifest (line 1344) | func (f bimodalFixture) rootmanifest() RootManifest {
method rootTree (line 1358) | func (f bimodalFixture) rootTree() pkgtree.PackageTree {
method failure (line 1380) | func (f bimodalFixture) failure() error {
type bmSourceManager (line 1387) | type bmSourceManager struct
method ListPackages (line 1404) | func (sm *bmSourceManager) ListPackages(id ProjectIdentifier, v Versio...
method GetManifestAndLock (line 1451) | func (sm *bmSourceManager) GetManifestAndLock(id ProjectIdentifier, v ...
function newbmSM (line 1394) | func newbmSM(bmf bimodalFixture) *bmSourceManager {
function computeBimodalExternalMap (line 1473) | func computeBimodalExternalMap(specs []depspec) map[pident]map[string][]...
FILE: gps/solve_failures.go
function a2vs (line 14) | func a2vs(a atom) string {
type traceError (line 22) | type traceError interface
type noVersionError (line 26) | type noVersionError struct
method Error (line 31) | func (e *noVersionError) Error() string {
method traceString (line 45) | func (e *noVersionError) traceString() string {
type caseMismatchFailure (line 65) | type caseMismatchFailure struct
method Error (line 78) | func (e *caseMismatchFailure) Error() string {
method traceString (line 96) | func (e *caseMismatchFailure) traceString() string {
type wrongCaseFailure (line 112) | type wrongCaseFailure struct
method Error (line 122) | func (e *wrongCaseFailure) Error() string {
method traceString (line 140) | func (e *wrongCaseFailure) traceString() string {
type disjointConstraintFailure (line 154) | type disjointConstraintFailure struct
method Error (line 171) | func (e *disjointConstraintFailure) Error() string {
method traceString (line 199) | func (e *disjointConstraintFailure) traceString() string {
type constraintNotAllowedFailure (line 225) | type constraintNotAllowedFailure struct
method Error (line 234) | func (e *constraintNotAllowedFailure) Error() string {
method traceString (line 244) | func (e *constraintNotAllowedFailure) traceString() string {
type versionNotAllowedFailure (line 258) | type versionNotAllowedFailure struct
method Error (line 271) | func (e *versionNotAllowedFailure) Error() string {
method traceString (line 292) | func (e *versionNotAllowedFailure) traceString() string {
type missingSourceFailure (line 303) | type missingSourceFailure struct
method Error (line 308) | func (e *missingSourceFailure) Error() string {
type badOptsFailure (line 312) | type badOptsFailure
method Error (line 314) | func (e badOptsFailure) Error() string {
type sourceMismatchFailure (line 318) | type sourceMismatchFailure struct
method Error (line 333) | func (e *sourceMismatchFailure) Error() string {
method traceString (line 343) | func (e *sourceMismatchFailure) traceString() string {
type errDeppers (line 355) | type errDeppers struct
type checkeeHasProblemPackagesFailure (line 369) | type checkeeHasProblemPackagesFailure struct
method Error (line 377) | func (e *checkeeHasProblemPackagesFailure) Error() string {
method traceString (line 424) | func (e *checkeeHasProblemPackagesFailure) traceString() string {
type depHasProblemPackagesFailure (line 459) | type depHasProblemPackagesFailure struct
method Error (line 473) | func (e *depHasProblemPackagesFailure) Error() string {
method traceString (line 518) | func (e *depHasProblemPackagesFailure) traceString() string {
type nonexistentRevisionFailure (line 551) | type nonexistentRevisionFailure struct
method Error (line 556) | func (e *nonexistentRevisionFailure) Error() string {
method traceString (line 565) | func (e *nonexistentRevisionFailure) traceString() string {
FILE: gps/solve_test.go
function overrideMkBridge (line 21) | func overrideMkBridge(s *solver, sm SourceManager, down bool) sourceBrid...
function fixSolve (line 25) | func fixSolve(params SolveParameters, sm SourceManager, t *testing.T) (S...
function TestBasicSolves (line 45) | func TestBasicSolves(t *testing.T) {
function solveBasicsAndCheck (line 62) | func solveBasicsAndCheck(fix basicFixture, t *testing.T) (res Solution, ...
function TestBimodalSolves (line 91) | func TestBimodalSolves(t *testing.T) {
function solveBimodalAndCheck (line 108) | func solveBimodalAndCheck(fix bimodalFixture, t *testing.T) (res Solutio...
function fixtureSolveSimpleChecks (line 133) | func fixtureSolveSimpleChecks(fix specfix, soln Solution, err error, t *...
function TestRootLockNoVersionPairMatching (line 217) | func TestRootLockNoVersionPairMatching(t *testing.T) {
FILE: gps/solver.go
type SolveParameters (line 32) | type SolveParameters struct
method toRootdata (line 168) | func (params SolveParameters) toRootdata() (rootdata, error) {
type solver (line 112) | type solver struct
method Name (line 369) | func (s *solver) Name() string {
method Version (line 373) | func (s *solver) Version() int {
method Solve (line 424) | func (s *solver) Solve(ctx context.Context) (Solution, error) {
method solve (line 474) | func (s *solver) solve(ctx context.Context) (map[atom]map[string]struc...
method selectRoot (line 610) | func (s *solver) selectRoot() error {
method getImportsAndConstraintsOf (line 645) | func (s *solver) getImportsAndConstraintsOf(a atomWithPackages) ([]str...
method intersectConstraintsWithImports (line 728) | func (s *solver) intersectConstraintsWithImports(deps []workingConstra...
method createVersionQueue (line 792) | func (s *solver) createVersionQueue(bmi bimodalIdentifier) (*versionQu...
method findValidVersion (line 911) | func (s *solver) findValidVersion(q *versionQueue, pl []string) error {
method getLockVersionIfValid (line 964) | func (s *solver) getLockVersionIfValid(id ProjectIdentifier) (Version,...
method backtrack (line 1008) | func (s *solver) backtrack(ctx context.Context) (bool, error) {
method nextUnselected (line 1112) | func (s *solver) nextUnselected() (bimodalIdentifier, bool) {
method unselectedComparator (line 1120) | func (s *solver) unselectedComparator(i, j int) bool {
method fail (line 1190) | func (s *solver) fail(id ProjectIdentifier) {
method selectAtom (line 1212) | func (s *solver) selectAtom(a atomWithPackages, pkgonly bool) error {
method unselectLast (line 1311) | func (s *solver) unselectLast() (atomWithPackages, bool, error) {
function Prepare (line 273) | func Prepare(params SolveParameters, sm SourceManager) (Solver, error) {
type Solver (line 325) | type Solver interface
type DeductionErrs (line 378) | type DeductionErrs
method Error (line 380) | func (e DeductionErrs) Error() string {
function ValidateParams (line 385) | func ValidateParams(params SolveParameters, sm SourceManager) error {
function pa2lp (line 1346) | func pa2lp(pa atom, pkgs map[string]struct{}) LockedProject {
function contextCanceledOrSMReleased (line 1379) | func contextCanceledOrSMReleased(err error) bool {
FILE: gps/solver_inputs_test.go
function TestBadSolveOpts (line 21) | func TestBadSolveOpts(t *testing.T) {
function TestValidateParams (line 177) | func TestValidateParams(t *testing.T) {
FILE: gps/source.go
type sourceState (line 22) | type sourceState
method String (line 35) | func (state sourceState) String() string {
constant sourceExistsUpstream (line 26) | sourceExistsUpstream sourceState = 1 << iota
constant sourceExistsLocally (line 28) | sourceExistsLocally
constant sourceHasLatestVersionList (line 30) | sourceHasLatestVersionList
constant sourceHasLatestLocally (line 32) | sourceHasLatestLocally
type srcReturn (line 56) | type srcReturn struct
type sourceCoordinator (line 61) | type sourceCoordinator struct
method close (line 92) | func (sc *sourceCoordinator) close() {
method getSourceGatewayFor (line 98) | func (sc *sourceCoordinator) getSourceGatewayFor(ctx context.Context, ...
function newSourceCoordinator (line 76) | func newSourceCoordinator(superv *supervisor, deducer deducer, cachedir ...
type sourceGateway (line 264) | type sourceGateway struct
method syncLocal (line 302) | func (sg *sourceGateway) syncLocal(ctx context.Context) error {
method existsInCache (line 309) | func (sg *sourceGateway) existsInCache(ctx context.Context) error {
method existsUpstream (line 316) | func (sg *sourceGateway) existsUpstream(ctx context.Context) error {
method exportVersionTo (line 323) | func (sg *sourceGateway) exportVersionTo(ctx context.Context, v Versio...
method exportPrunedVersionTo (line 358) | func (sg *sourceGateway) exportPrunedVersionTo(ctx context.Context, lp...
method getManifestAndLock (line 387) | func (sg *sourceGateway) getManifestAndLock(ctx context.Context, pr Pr...
method listPackages (line 440) | func (sg *sourceGateway) listPackages(ctx context.Context, pr ProjectR...
method convertToRevision (line 494) | func (sg *sourceGateway) convertToRevision(ctx context.Context, v Vers...
method listVersions (line 534) | func (sg *sourceGateway) listVersions(ctx context.Context) ([]PairedVe...
method revisionPresentIn (line 552) | func (sg *sourceGateway) revisionPresentIn(ctx context.Context, r Revi...
method disambiguateRevision (line 572) | func (sg *sourceGateway) disambiguateRevision(ctx context.Context, r R...
method sourceExistsUpstream (line 586) | func (sg *sourceGateway) sourceExistsUpstream(ctx context.Context) (so...
method initLocal (line 600) | func (sg *sourceGateway) initLocal(ctx context.Context) (sourceState, ...
method loadLatestVersionList (line 612) | func (sg *sourceGateway) loadLatestVersionList(ctx context.Context) (s...
method require (line 636) | func (sg *sourceGateway) require(ctx context.Context, wanted sourceSta...
function newSourceGateway (line 275) | func newSourceGateway(ctx context.Context, src source, superv *superviso...
type source (line 682) | type source interface
type sourceFastPrune (line 705) | type sourceFastPrune interface
FILE: gps/source_cache.go
type sourceCache (line 19) | type sourceCache interface
type singleSourceCache (line 29) | type singleSourceCache interface
type memoryCache (line 77) | type memoryCache struct
method newSingleSourceCache (line 79) | func (memoryCache) newSingleSourceCache(ProjectIdentifier) singleSourc...
method close (line 83) | func (memoryCache) close() error { return nil }
type singleSourceCacheMemory (line 85) | type singleSourceCacheMemory struct
method setManifestAndLock (line 111) | func (c *singleSourceCacheMemory) setManifestAndLock(r Revision, pai P...
method getManifestAndLock (line 128) | func (c *singleSourceCacheMemory) getManifestAndLock(r Revision, pai P...
method setPackageTree (line 144) | func (c *singleSourceCacheMemory) setPackageTree(r Revision, ptree pkg...
method getPackageTree (line 162) | func (c *singleSourceCacheMemory) getPackageTree(r Revision, pr Projec...
method setVersionMap (line 186) | func (c *singleSourceCacheMemory) setVersionMap(versionList []PairedVe...
method markRevisionExists (line 205) | func (c *singleSourceCacheMemory) markRevisionExists(r Revision) {
method getVersionsFor (line 213) | func (c *singleSourceCacheMemory) getVersionsFor(r Revision) ([]Unpair...
method getAllVersions (line 220) | func (c *singleSourceCacheMemory) getAllVersions() ([]PairedVersion, b...
method getRevisionFor (line 233) | func (c *singleSourceCacheMemory) getRevisionFor(uv UnpairedVersion) (...
method toRevision (line 240) | func (c *singleSourceCacheMemory) toRevision(v Version) (Revision, boo...
method toUnpaired (line 256) | func (c *singleSourceCacheMemory) toUnpaired(v Version) (UnpairedVersi...
function newMemoryCache (line 97) | func newMemoryCache() singleSourceCache {
type projectInfo (line 106) | type projectInfo struct
function locksAreEq (line 277) | func locksAreEq(l1, l2 Lock) bool {
FILE: gps/source_cache_bolt.go
constant boltCacheFilename (line 26) | boltCacheFilename = "bolt-v1.db"
type boltCache (line 29) | type boltCache struct
method newSingleSourceCache (line 60) | func (c *boltCache) newSingleSourceCache(pi ProjectIdentifier) singleS...
method close (line 68) | func (c *boltCache) close() error {
function newBoltCache (line 36) | func newBoltCache(cd string, epoch int64, logger *log.Logger) (*boltCach...
type singleSourceCacheBolt (line 107) | type singleSourceCacheBolt struct
method setManifestAndLock (line 112) | func (s *singleSourceCacheBolt) setManifestAndLock(rev Revision, ai Pr...
method getManifestAndLock (line 155) | func (s *singleSourceCacheBolt) getManifestAndLock(rev Revision, ai Pr...
method setPackageTree (line 194) | func (s *singleSourceCacheBolt) setPackageTree(rev Revision, ptree pkg...
method getPackageTree (line 229) | func (s *singleSourceCacheBolt) getPackageTree(rev Revision, pr Projec...
method markRevisionExists (line 268) | func (s *singleSourceCacheBolt) markRevisionExists(rev Revision) {
method setVersionMap (line 277) | func (s *singleSourceCacheBolt) setVersionMap(pvs []PairedVersion) {
method getVersionsFor (line 341) | func (s *singleSourceCacheBolt) getVersionsFor(rev Revision) (uvs []Un...
method getAllVersions (line 370) | func (s *singleSourceCacheBolt) getAllVersions() (pvs []PairedVersion,...
method getRevisionFor (line 398) | func (s *singleSourceCacheBolt) getRevisionFor(uv UnpairedVersion) (re...
method toRevision (line 425) | func (s *singleSourceCacheBolt) toRevision(v Version) (rev Revision, o...
method toUnpaired (line 439) | func (s *singleSourceCacheBolt) toUnpaired(v Version) (uv UnpairedVers...
method viewSourceBucket (line 489) | func (s *singleSourceCacheBolt) viewSourceBucket(view func(b *bolt.Buc...
method updateSourceBucket (line 500) | func (s *singleSourceCacheBolt) updateSourceBucket(update func(b *bolt...
method viewRevBucket (line 511) | func (s *singleSourceCacheBolt) viewRevBucket(rev Revision, view func(...
method updateRevBucket (line 522) | func (s *singleSourceCacheBolt) updateRevBucket(rev Revision, update f...
function cacheRevisionName (line 481) | func cacheRevisionName(rev Revision) []byte {
FILE: gps/source_cache_bolt_encode.go
function propertiesFromCache (line 40) | func propertiesFromCache(m *pb.ProjectProperties) (ProjectRoot, ProjectP...
type projectPropertiesMsgs (line 59) | type projectPropertiesMsgs struct
method copyFrom (line 65) | func (ms *projectPropertiesMsgs) copyFrom(ip ProjectRoot, pp ProjectPr...
function cachePutManifest (line 78) | func cachePutManifest(b *bolt.Bucket, m Manifest) error {
function cacheGetManifest (line 170) | func cacheGetManifest(b *bolt.Bucket) (RootManifest, error) {
method copyTo (line 244) | func (lp lockedProject) copyTo(msg *pb.LockedProject, c *pb.Constraint) {
function copyLockedProjectTo (line 260) | func copyLockedProjectTo(lp LockedProject, msg *pb.LockedProject, c *pb....
function lockedProjectFromCache (line 288) | func lockedProjectFromCache(m *pb.LockedProject) (LockedProject, error) {
function cachePutLock (line 309) | func cachePutLock(b *bolt.Bucket, l Lock) error {
function cacheGetLock (line 342) | func cacheGetLock(b *bolt.Bucket) (*safeLock, error) {
function cachePutPackageOrErr (line 370) | func cachePutPackageOrErr(b *bolt.Bucket, poe pkgtree.PackageOrErr) error {
function cacheGetPackageOrErr (line 422) | func cacheGetPackageOrErr(b *bolt.Bucket) (pkgtree.PackageOrErr, error) {
function cacheTimestampedKey (line 454) | func cacheTimestampedKey(pre byte, t time.Time) []byte {
type boltTxOrBucket (line 462) | type boltTxOrBucket interface
function cachePrefixDelete (line 469) | func cachePrefixDelete(tob boltTxOrBucket, pre byte) error {
function cacheFindLatestValid (line 481) | func cacheFindLatestValid(tob boltTxOrBucket, pre byte, epoch int64) *bo...
FILE: gps/source_cache_bolt_encode_test.go
function TestPropertiesFromCache (line 15) | func TestPropertiesFromCache(t *testing.T) {
function TestCacheTimestampedKey (line 61) | func TestCacheTimestampedKey(t *testing.T) {
FILE: gps/source_cache_bolt_test.go
function TestBoltCacheTimeout (line 18) | func TestBoltCacheTimeout(t *testing.T) {
FILE: gps/source_cache_multi.go
type multiCache (line 12) | type multiCache struct
method processAsync (line 33) | func (c *multiCache) processAsync() {
method close (line 41) | func (c *multiCache) close() error {
method newSingleSourceCache (line 49) | func (c *multiCache) newSingleSourceCache(id ProjectIdentifier) single...
function newMultiCache (line 22) | func newMultiCache(mem, disk sourceCache) *multiCache {
type singleSourceMultiCache (line 65) | type singleSourceMultiCache struct
method setManifestAndLock (line 71) | func (c *singleSourceMultiCache) setManifestAndLock(r Revision, ai Pro...
method getManifestAndLock (line 76) | func (c *singleSourceMultiCache) getManifestAndLock(r Revision, ai Pro...
method setPackageTree (line 91) | func (c *singleSourceMultiCache) setPackageTree(r Revision, ptree pkgt...
method getPackageTree (line 96) | func (c *singleSourceMultiCache) getPackageTree(r Revision, pr Project...
method markRevisionExists (line 111) | func (c *singleSourceMultiCache) markRevisionExists(r Revision) {
method setVersionMap (line 116) | func (c *singleSourceMultiCache) setVersionMap(pvs []PairedVersion) {
method getVersionsFor (line 121) | func (c *singleSourceMultiCache) getVersionsFor(rev Revision) ([]Unpai...
method getAllVersions (line 130) | func (c *singleSourceMultiCache) getAllVersions() ([]PairedVersion, bo...
method getRevisionFor (line 145) | func (c *singleSourceMultiCache) getRevisionFor(uv UnpairedVersion) (R...
method toRevision (line 154) | func (c *singleSourceMultiCache) toRevision(v Version) (Revision, bool) {
method toUnpaired (line 163) | func (c *singleSourceMultiCache) toUnpaired(v Version) (UnpairedVersio...
FILE: gps/source_cache_test.go
function Test_singleSourceCache (line 21) | func Test_singleSourceCache(t *testing.T) {
type singleSourceCacheTest (line 71) | type singleSourceCacheTest struct
method run (line 78) | func (test singleSourceCacheTest) run(t *testing.T) {
function compareManifests (line 416) | func compareManifests(t *testing.T, want, got Manifest) {
function comparePackageTree (line 462) | func comparePackageTree(t *testing.T, want, got pkgtree.PackageTree) {
function projectConstraintsEqual (line 482) | func projectConstraintsEqual(want, got ProjectConstraints) bool {
function mapStringBoolEqual (line 506) | func mapStringBoolEqual(exp, got map[string]bool) bool {
function safeError (line 520) | func safeError(err error) string {
function packageOrErrEqual (line 529) | func packageOrErrEqual(a, b pkgtree.PackageOrErr) bool {
type discardCache (line 569) | type discardCache struct
method newSingleSourceCache (line 571) | func (discardCache) newSingleSourceCache(ProjectIdentifier) singleSour...
method close (line 575) | func (discardCache) close() error { return nil }
type singleSourceDiscardCache (line 580) | type singleSourceDiscardCache struct
method setManifestAndLock (line 582) | func (singleSourceDiscardCache) setManifestAndLock(Revision, ProjectAn...
method getManifestAndLock (line 584) | func (singleSourceDiscardCache) getManifestAndLock(Revision, ProjectAn...
method setPackageTree (line 588) | func (singleSourceDiscardCache) setPackageTree(Revision, pkgtree.Packa...
method getPackageTree (line 590) | func (singleSourceDiscardCache) getPackageTree(Revision, ProjectRoot) ...
method markRevisionExists (line 594) | func (singleSourceDiscardCache) markRevisionExists(r Revision) {}
method setVersionMap (line 596) | func (singleSourceDiscardCache) setVersionMap(versionList []PairedVers...
method getVersionsFor (line 598) | func (singleSourceDiscardCache) getVersionsFor(Revision) ([]UnpairedVe...
method getAllVersions (line 602) | func (singleSourceDiscardCache) getAllVersions() ([]PairedVersion, boo...
method getRevisionFor (line 606) | func (singleSourceDiscardCache) getRevisionFor(UnpairedVersion) (Revis...
method toRevision (line 610) | func (singleSourceDiscardCache) toRevision(v Version) (Revision, bool) {
method toUnpaired (line 614) | func (singleSourceDiscardCache) toUnpaired(v Version) (UnpairedVersion...
FILE: gps/source_errors.go
function unwrapVcsErr (line 15) | func unwrapVcsErr(err error) error {
FILE: gps/source_errors_test.go
function TestUnwrapVcsErrNonNil (line 13) | func TestUnwrapVcsErrNonNil(t *testing.T) {
FILE: gps/source_manager.go
type locker (line 37) | type locker interface
type falseLocker (line 49) | type falseLocker struct
method GetOwner (line 53) | func (fl falseLocker) GetOwner() (*os.Process, error) {
method TryLock (line 58) | func (fl falseLocker) TryLock() error {
method Unlock (line 63) | func (fl falseLocker) Unlock() error {
type SourceManager (line 74) | type SourceManager interface
type ProjectAnalyzer (line 137) | type ProjectAnalyzer interface
type ProjectAnalyzerInfo (line 153) | type ProjectAnalyzerInfo struct
method String (line 159) | func (p ProjectAnalyzerInfo) String() string {
type SourceMgr (line 167) | type SourceMgr struct
method Cachedir (line 322) | func (sm *SourceMgr) Cachedir() string {
method UseDefaultSignalHandling (line 328) | func (sm *SourceMgr) UseDefaultSignalHandling() {
method HandleSignals (line 346) | func (sm *SourceMgr) HandleSignals(sigch chan os.Signal) {
method StopSignalHandling (line 386) | func (sm *SourceMgr) StopSignalHandling() {
method Release (line 411) | func (sm *SourceMgr) Release() {
method GetManifestAndLock (line 438) | func (sm *SourceMgr) GetManifestAndLock(id ProjectIdentifier, v Versio...
method ListPackages (line 453) | func (sm *SourceMgr) ListPackages(id ProjectIdentifier, v Version) (pk...
method ListVersions (line 478) | func (sm *SourceMgr) ListVersions(id ProjectIdentifier) ([]PairedVersi...
method RevisionPresentIn (line 494) | func (sm *SourceMgr) RevisionPresentIn(id ProjectIdentifier, r Revisio...
method SourceExists (line 510) | func (sm *SourceMgr) SourceExists(id ProjectIdentifier) (bool, error) {
method SyncSourceFor (line 534) | func (sm *SourceMgr) SyncSourceFor(id ProjectIdentifier) error {
method ExportProject (line 549) | func (sm *SourceMgr) ExportProject(ctx context.Context, id ProjectIden...
method ExportPrunedProject (line 564) | func (sm *SourceMgr) ExportPrunedProject(ctx context.Context, lp Locke...
method DeduceProjectRoot (line 584) | func (sm *SourceMgr) DeduceProjectRoot(ip string) (ProjectRoot, error) {
method InferConstraint (line 602) | func (sm *SourceMgr) InferConstraint(s string, pi ProjectIdentifier) (...
method SourceURLsForPath (line 649) | func (sm *SourceMgr) SourceURLsForPath(ip string) ([]*url.URL, error) {
method disambiguateRevision (line 664) | func (sm *SourceMgr) disambiguateRevision(ctx context.Context, pi Proj...
type SourceManagerConfig (line 188) | type SourceManagerConfig struct
function NewSourceManager (line 210) | func NewSourceManager(c SourceManagerConfig) (*SourceMgr, error) {
type CouldNotCreateLockError (line 399) | type CouldNotCreateLockError struct
method Error (line 404) | func (e CouldNotCreateLockError) Error() string {
type timeCount (line 672) | type timeCount struct
type durCount (line 677) | type durCount struct
type supervisor (line 682) | type supervisor struct
method do (line 704) | func (sup *supervisor) do(inctx context.Context, name string, typ call...
method start (line 722) | func (sup *supervisor) start(ci callInfo) (context.Context, error) {
method count (line 743) | func (sup *supervisor) count() int {
method done (line 749) | func (sup *supervisor) done(ci callInfo) {
method wait (line 781) | func (sup *supervisor) wait() {
function newSupervisor (line 690) | func newSupervisor(ctx context.Context) *supervisor {
type callType (line 789) | type callType
method String (line 803) | func (ct callType) String() string {
constant ctHTTPMetadata (line 792) | ctHTTPMetadata callType = iota
constant ctListVersions (line 793) | ctListVersions
constant ctGetManifestAndLock (line 794) | ctGetManifestAndLock
constant ctListPackages (line 795) | ctListPackages
constant ctSourcePing (line 796) | ctSourcePing
constant ctSourceInit (line 797) | ctSourceInit
constant ctSourceFetch (line 798) | ctSourceFetch
constant ctExportTree (line 799) | ctExportTree
constant ctValidateLocal (line 800) | ctValidateLocal
type callInfo (line 827) | type callInfo struct
FILE: gps/source_manager_test.go
function TestSourceManager_InferConstraint (line 15) | func TestSourceManager_InferConstraint(t *testing.T) {
FILE: gps/source_test.go
function testSourceGateway (line 21) | func testSourceGateway(t *testing.T) {
FILE: gps/strings.go
function toFold (line 20) | func toFold(s string) string {
FILE: gps/trace.go
constant successChar (line 16) | successChar = "✓"
constant successCharSp (line 17) | successCharSp = successChar + " "
constant failChar (line 18) | failChar = "✗"
constant failCharSp (line 19) | failCharSp = failChar + " "
constant backChar (line 20) | backChar = "←"
constant innerIndent (line 21) | innerIndent = " "
method traceCheckPkgs (line 24) | func (s *solver) traceCheckPkgs(bmi bimodalIdentifier) {
method traceCheckQueue (line 33) | func (s *solver) traceCheckQueue(q *versionQueue, bmi bimodalIdentifier,...
method traceStartBacktrack (line 61) | func (s *solver) traceStartBacktrack(bmi bimodalIdentifier, err error, p...
method traceBacktrack (line 79) | func (s *solver) traceBacktrack(bmi bimodalIdentifier, pkgonly bool) {
method traceFinish (line 96) | func (s *solver) traceFinish(sol solution, err error) {
method traceSelectRoot (line 113) | func (s *solver) traceSelectRoot(ptree pkgtree.PackageTree, cdeps []comp...
method traceSelect (line 136) | func (s *solver) traceSelect(awp atomWithPackages, pkgonly bool) {
method traceInfo (line 152) | func (s *solver) traceInfo(args ...interface{}) {
function getprei (line 182) | func getprei(i int) string {
function tracePrefix (line 194) | func tracePrefix(msg, sep, fsep string) string {
FILE: gps/typed_radix.go
type deducerTrie (line 22) | type deducerTrie struct
method Delete (line 37) | func (t *deducerTrie) Delete(s string) (pathDeducer, bool) {
method Insert (line 47) | func (t *deducerTrie) Insert(s string, d pathDeducer) (pathDeducer, bo...
method LongestPrefix (line 58) | func (t *deducerTrie) LongestPrefix(s string) (string, pathDeducer, bo...
function newDeducerTrie (line 27) | func newDeducerTrie() *deducerTrie {
function isPathPrefixOrEqual (line 82) | func isPathPrefixOrEqual(pre, path string) bool {
FILE: gps/typed_radix_test.go
function TestPathPrefixOrEqual (line 10) | func TestPathPrefixOrEqual(t *testing.T) {
FILE: gps/vcs_repo.go
type ctxRepo (line 21) | type ctxRepo interface
type ensureCleaner (line 30) | type ensureCleaner interface
type gitRepo (line 39) | type gitRepo struct
method get (line 57) | func (r *gitRepo) get(ctx context.Context) error {
method fetch (line 78) | func (r *gitRepo) fetch(ctx context.Context) error {
method updateVersion (line 97) | func (r *gitRepo) updateVersion(ctx context.Context, v string) error {
method defendAgainstSubmodules (line 110) | func (r *gitRepo) defendAgainstSubmodules(ctx context.Context) error {
method ensureClean (line 161) | func (r *gitRepo) ensureClean(ctx context.Context) error {
function newVcsRemoteErrorOr (line 43) | func newVcsRemoteErrorOr(err error, args []string, out, msg string) error {
function newVcsLocalErrorOr (line 50) | func newVcsLocalErrorOr(err error, args []string, out, msg string) error {
type bzrRepo (line 226) | type bzrRepo struct
method get (line 230) | func (r *bzrRepo) get(ctx context.Context) error {
method fetch (line 248) | func (r *bzrRepo) fetch(ctx context.Context) error {
method updateVersion (line 258) | func (r *bzrRepo) updateVersion(ctx context.Context, version string) e...
type hgRepo (line 268) | type hgRepo struct
method get (line 272) | func (r *hgRepo) get(ctx context.Context) error {
method fetch (line 282) | func (r *hgRepo) fetch(ctx context.Context) error {
method updateVersion (line 292) | func (r *hgRepo) updateVersion(ctx context.Context, version string) er...
type svnRepo (line 303) | type svnRepo struct
method get (line 307) | func (r *svnRepo) get(ctx context.Context) error {
method fetch (line 324) | func (r *svnRepo) fetch(ctx context.Context) error {
method updateVersion (line 335) | func (r *svnRepo) updateVersion(ctx context.Context, version string) e...
method CommitInfo (line 346) | func (r *svnRepo) CommitInfo(id string) (*vcs.CommitInfo, error) {
FILE: gps/vcs_repo_test.go
constant gitRemoteTestRepo (line 21) | gitRemoteTestRepo = "https://github.com/Masterminds/VCSTestRepo"
function TestErrs (line 23) | func TestErrs(t *testing.T) {
function testSvnRepo (line 51) | func testSvnRepo(t *testing.T) {
function testHgRepo (line 144) | func testHgRepo(t *testing.T) {
function testGitRepo (line 204) | func testGitRepo(t *testing.T) {
function testBzrRepo (line 281) | func testBzrRepo(t *testing.T) {
FILE: gps/vcs_source.go
type baseVCSSource (line 22) | type baseVCSSource struct
method sourceType (line 26) | func (bs *baseVCSSource) sourceType() string {
method existsLocally (line 30) | func (bs *baseVCSSource) existsLocally(ctx context.Context) bool {
method existsUpstream (line 34) | func (bs *baseVCSSource) existsUpstream(ctx context.Context) bool {
method existsCallsListVersions (line 38) | func (*baseVCSSource) existsCallsListVersions() bool {
method listVersionsRequiresLocal (line 42) | func (*baseVCSSource) listVersionsRequiresLocal() bool {
method upstreamURL (line 46) | func (bs *baseVCSSource) upstreamURL() string {
method disambiguateRevision (line 50) | func (bs *baseVCSSource) disambiguateRevision(ctx context.Context, r R...
method getManifestAndLock (line 58) | func (bs *baseVCSSource) getManifestAndLock(ctx context.Context, pr Pr...
method revisionPresentIn (line 76) | func (bs *baseVCSSource) revisionPresentIn(r Revision) (bool, error) {
method initLocal (line 82) | func (bs *baseVCSSource) initLocal(ctx context.Context) error {
method updateLocal (line 93) | func (bs *baseVCSSource) updateLocal(ctx context.Context) error {
method maybeClean (line 114) | func (bs *baseVCSSource) maybeClean(ctx context.Context) error {
method listPackages (line 126) | func (bs *baseVCSSource) listPackages(ctx context.Context, pr ProjectR...
method exportRevisionTo (line 138) | func (bs *baseVCSSource) exportRevisionTo(ctx context.Context, r Revis...
type gitSource (line 158) | type gitSource struct
method exportRevisionTo (line 162) | func (s *gitSource) exportRevisionTo(ctx context.Context, rev Revision...
method isValidHash (line 209) | func (s *gitSource) isValidHash(hash []byte) bool {
method existsCallsListVersions (line 213) | func (*gitSource) existsCallsListVersions() bool {
method listVersions (line 217) | func (s *gitSource) listVersions(ctx context.Context) (vlist []PairedV...
type gopkginSource (line 356) | type gopkginSource struct
method upstreamURL (line 365) | func (s *gopkginSource) upstreamURL() string {
method listVersions (line 369) | func (s *gopkginSource) listVersions(ctx context.Context) ([]PairedVer...
type bzrSource (line 453) | type bzrSource struct
method exportRevisionTo (line 457) | func (s *bzrSource) exportRevisionTo(ctx context.Context, rev Revision...
method listVersionsRequiresLocal (line 465) | func (s *bzrSource) listVersionsRequiresLocal() bool {
method listVersions (line 469) | func (s *bzrSource) listVersions(ctx context.Context) ([]PairedVersion...
method disambiguateRevision (line 507) | func (s *bzrSource) disambiguateRevision(ctx context.Context, r Revisi...
type hgSource (line 524) | type hgSource struct
method exportRevisionTo (line 528) | func (s *hgSource) exportRevisionTo(ctx context.Context, rev Revision,...
method listVersionsRequiresLocal (line 538) | func (s *hgSource) listVersionsRequiresLocal() bool {
method hgCmd (line 542) | func (s *hgSource) hgCmd(ctx context.Context, args ...string) cmd {
method listVersions (line 552) | func (s *hgSource) listVersions(ctx context.Context) ([]PairedVersion,...
FILE: gps/vcs_source_test.go
function TestSlowVcs (line 25) | func TestSlowVcs(t *testing.T) {
function testGitSourceInteractions (line 39) | func testGitSourceInteractions(t *testing.T) {
function testGopkginSourceInteractions (line 133) | func testGopkginSourceInteractions(t *testing.T) {
function testBzrSourceInteractions (line 296) | func testBzrSourceInteractions(t *testing.T) {
function testHgSourceInteractions (line 406) | func testHgSourceInteractions(t *testing.T) {
function TestGitSourceListVersionsNoHEAD (line 537) | func TestGitSourceListVersionsNoHEAD(t *testing.T) {
function TestGitSourceListVersionsNoDupes (line 595) | func TestGitSourceListVersionsNoDupes(t *testing.T) {
function TestGitSourceAdaptiveCleanup (line 657) | func TestGitSourceAdaptiveCleanup(t *testing.T) {
function Test_bzrSource_exportRevisionTo_removeVcsFiles (line 751) | func Test_bzrSource_exportRevisionTo_removeVcsFiles(t *testing.T) {
function Test_hgSource_exportRevisionTo_removeVcsFiles (line 808) | func Test_hgSource_exportRevisionTo_removeVcsFiles(t *testing.T) {
function requiresBins (line 862) | func requiresBins(t *testing.T, bins ...string) {
FILE: gps/vcs_version.go
function VCSVersion (line 15) | func VCSVersion(path string) (Version, error) {
function contains (line 60) | func contains(a []string, b string) bool {
FILE: gps/vcs_version_test.go
function TestVCSVersion (line 14) | func TestVCSVersion(t *testing.T) {
FILE: gps/verify/digest.go
constant HashVersion (line 28) | HashVersion = 1
constant osPathSeparator (line 30) | osPathSeparator = string(filepath.Separator)
type lineEndingReader (line 44) | type lineEndingReader struct
method Read (line 60) | func (f *lineEndingReader) Read(buf []byte) (int, error) {
function newLineEndingReader (line 51) | func newLineEndingReader(src io.Reader) *lineEndingReader {
function writeBytesWithNull (line 131) | func writeBytesWithNull(h hash.Hash, data []byte) {
type dirWalkClosure (line 139) | type dirWalkClosure struct
function DigestFromDirectory (line 160) | func DigestFromDirectory(osDirname string) (VersionedDigest, error) {
type VendorStatus (line 270) | type VendorStatus
method String (line 300) | func (ls VendorStatus) String() string {
constant NotInLock (line 275) | NotInLock VendorStatus = iota
constant NotInTree (line 279) | NotInTree
constant NoMismatch (line 283) | NoMismatch
constant EmptyDigestInLock (line 288) | EmptyDigestInLock
constant DigestMismatchInLock (line 292) | DigestMismatchInLock
constant HashVersionMismatch (line 297) | HashVersionMismatch
type fsnode (line 323) | type fsnode struct
type VersionedDigest (line 331) | type VersionedDigest struct
method String (line 336) | func (vd VersionedDigest) String() string {
method IsEmpty (line 341) | func (vd VersionedDigest) IsEmpty() bool {
function ParseVersionedDigest (line 348) | func ParseVersionedDigest(input string) (VersionedDigest, error) {
function CheckDepTree (line 376) | func CheckDepTree(osDirname string, wantDigests map[string]VersionedDige...
function sortedChildrenFromDirname (line 537) | func sortedChildrenFromDirname(osDirname string) ([]string, error) {
FILE: gps/verify/digest_test.go
type crossBuffer (line 16) | type crossBuffer struct
method Read (line 21) | func (cb *crossBuffer) Read(buf []byte) (int, error) {
function streamThruLineEndingReader (line 29) | func streamThruLineEndingReader(t *testing.T, iterations []string) []byte {
function TestLineEndingReader (line 41) | func TestLineEndingReader(t *testing.T) {
function getTestdataVerifyRoot (line 95) | func getTestdataVerifyRoot(t *testing.T) string {
function TestDigestFromDirectoryBailsUnlessDirectory (line 103) | func TestDigestFromDirectoryBailsUnlessDirectory(t *testing.T) {
function TestDigestFromDirectory (line 112) | func TestDigestFromDirectory(t *testing.T) {
function TestVerifyDepTree (line 144) | func TestVerifyDepTree(t *testing.T) {
function TestParseVersionedDigest (line 267) | func TestParseVersionedDigest(t *testing.T) {
function BenchmarkDigestFromDirectory (line 314) | func BenchmarkDigestFromDirectory(b *testing.B) {
function BenchmarkVerifyDepTree (line 327) | func BenchmarkVerifyDepTree(b *testing.B) {
FILE: gps/verify/helper_types_test.go
function mkPI (line 17) | func mkPI(root string) gps.ProjectIdentifier {
type safeLock (line 23) | type safeLock struct
method InputImports (line 28) | func (sl safeLock) InputImports() []string {
method Projects (line 32) | func (sl safeLock) Projects() []gps.LockedProject {
method dup (line 36) | func (sl safeLock) dup() safeLock {
method dup (line 51) | func (vp VerifiableProject) dup() VerifiableProject {
type simpleRootManifest (line 69) | type simpleRootManifest struct
method DependencyConstraints (line 75) | func (m simpleRootManifest) DependencyConstraints() gps.ProjectConstra...
method Overrides (line 78) | func (m simpleRootManifest) Overrides() gps.ProjectConstraints {
method IgnoredPackages (line 81) | func (m simpleRootManifest) IgnoredPackages() *pkgtree.IgnoredRuleset {
method RequiredPackages (line 84) | func (m simpleRootManifest) RequiredPackages() map[string]bool {
method dup (line 88) | func (m simpleRootManifest) dup() simpleRootManifest {
function newVerifiableProject (line 111) | func newVerifiableProject(id gps.ProjectIdentifier, v gps.Version, pkgs ...
FILE: gps/verify/lock.go
type VerifiableProject (line 14) | type VerifiableProject struct
FILE: gps/verify/lockdiff.go
type DeltaDimension (line 17) | type DeltaDimension
constant InputImportsChanged (line 22) | InputImportsChanged DeltaDimension = 1 << iota
constant ProjectAdded (line 23) | ProjectAdded
constant ProjectRemoved (line 24) | ProjectRemoved
constant SourceChanged (line 25) | SourceChanged
constant VersionChanged (line 26) | VersionChanged
constant RevisionChanged (line 27) | RevisionChanged
constant PackagesChanged (line 28) | PackagesChanged
constant PruneOptsChanged (line 29) | PruneOptsChanged
constant HashVersionChanged (line 30) | HashVersionChanged
constant HashChanged (line 31) | HashChanged
constant AnyChanged (line 32) | AnyChanged = (1 << iota) - 1
type LockDelta (line 36) | type LockDelta struct
method Changed (line 231) | func (ld LockDelta) Changed(dims DeltaDimension) bool {
method Changes (line 251) | func (ld LockDelta) Changes() DeltaDimension {
type LockedProjectDelta (line 46) | type LockedProjectDelta struct
method Changed (line 270) | func (ld LockedProjectDelta) Changed(dims DeltaDimension) bool {
method Changes (line 285) | func (ld LockedProjectDelta) Changes() DeltaDimension {
method WasRemoved (line 300) | func (ld LockedProjectDelta) WasRemoved() bool {
method WasAdded (line 306) | func (ld LockedProjectDelta) WasAdded() bool {
type LockedProjectPropertiesDelta (line 55) | type LockedProjectPropertiesDelta struct
method Changed (line 316) | func (ld LockedProjectPropertiesDelta) Changed(dims DeltaDimension) bo...
method Changes (line 344) | func (ld LockedProjectPropertiesDelta) Changes() DeltaDimension {
method SourceChanged (line 373) | func (ld LockedProjectPropertiesDelta) SourceChanged() bool {
method VersionChanged (line 382) | func (ld LockedProjectPropertiesDelta) VersionChanged() bool {
method RevisionChanged (line 396) | func (ld LockedProjectPropertiesDelta) RevisionChanged() bool {
method PackagesChanged (line 402) | func (ld LockedProjectPropertiesDelta) PackagesChanged() bool {
method PruneOptsChanged (line 408) | func (ld LockedProjectPropertiesDelta) PruneOptsChanged() bool {
method HashVersionChanged (line 414) | func (ld LockedProjectPropertiesDelta) HashVersionChanged() bool {
method HashVersionWasZero (line 420) | func (ld LockedProjectPropertiesDelta) HashVersionWasZero() bool {
function DiffLocks (line 67) | func DiffLocks(l1, l2 gps.Lock) LockDelta {
function findAddedAndRemoved (line 143) | func findAddedAndRemoved(l1, l2 []string) (add, remove []string) {
function DiffLockedProjectProperties (line 176) | func DiffLockedProjectProperties(lp1, lp2 gps.LockedProject) LockedProje...
function sortLockedProjects (line 425) | func sortLockedProjects(lps []gps.LockedProject) []gps.LockedProject {
FILE: gps/verify/lockdiff_test.go
function contains (line 16) | func contains(haystack []string, needle string) bool {
method String (line 25) | func (dd DeltaDimension) String() string {
function TestLockDelta (line 59) | func TestLockDelta(t *testing.T) {
function TestLockedProjectPropertiesDelta (line 161) | func TestLockedProjectPropertiesDelta(t *testing.T) {
type lockTransformer (line 338) | type lockTransformer
method compose (line 340) | func (lt lockTransformer) compose(lt2 lockTransformer) lockTransformer {
method addDumbProject (line 349) | func (lt lockTransformer) addDumbProject(root string) lockTransformer {
method rmProject (line 362) | func (lt lockTransformer) rmProject(pr string) lockTransformer {
method addII (line 374) | func (lt lockTransformer) addII(path string) lockTransformer {
method rmII (line 386) | func (lt lockTransformer) rmII(path string) lockTransformer {
type lockedProjectTransformer (line 398) | type lockedProjectTransformer
method compose (line 400) | func (lpt lockedProjectTransformer) compose(lpt2 lockedProjectTransfor...
method addPkg (line 409) | func (lpt lockedProjectTransformer) addPkg(path string) lockedProjectT...
method rmPkg (line 426) | func (lpt lockedProjectTransformer) rmPkg(path string) lockedProjectTr...
method setSource (line 444) | func (lpt lockedProjectTransformer) setSource(source string) lockedPro...
method setVersion (line 457) | func (lpt lockedProjectTransformer) setVersion(v gps.Version) lockedPr...
method setPruneOpts (line 468) | func (lpt lockedProjectTransformer) setPruneOpts(po gps.PruneOptions) ...
method setDigest (line 476) | func (lpt lockedProjectTransformer) setDigest(vd VersionedDigest) lock...
method toPlainLP (line 484) | func (lpt lockedProjectTransformer) toPlainLP() lockedProjectTransform...
FILE: gps/verify/locksat.go
type LockSatisfaction (line 20) | type LockSatisfaction struct
method Satisfied (line 158) | func (ls LockSatisfaction) Satisfied() bool {
type ConstraintMismatch (line 40) | type ConstraintMismatch struct
function LockSatisfiesInputs (line 53) | func LockSatisfiesInputs(l gps.Lock, m gps.RootManifest, ptree pkgtree.P...
function findEffectualConstraints (line 182) | func findEffectualConstraints(m gps.Manifest, imports map[string]bool) m...
FILE: gps/verify/locksat_test.go
type lockUnsatisfactionDimension (line 15) | type lockUnsatisfactionDimension
method String (line 25) | func (lsd lockUnsatisfactionDimension) String() string {
constant noLock (line 18) | noLock lockUnsatisfactionDimension = 1 << iota
constant missingImports (line 19) | missingImports
constant excessImports (line 20) | excessImports
constant unmatchedOverrides (line 21) | unmatchedOverrides
constant unmatchedConstraints (line 22) | unmatchedConstraints
function TestLockSatisfaction (line 47) | func TestLockSatisfaction(t *testing.T) {
method unsatTypes (line 187) | func (ls LockSatisfaction) unsatTypes() lockUnsatisfactionDimension {
type rootManifestTransformer (line 209) | type rootManifestTransformer
method compose (line 211) | func (rmt rootManifestTransformer) compose(rmt2 rootManifestTransforme...
method addReq (line 220) | func (rmt rootManifestTransformer) addReq(path string) rootManifestTra...
method rmReq (line 227) | func (rmt rootManifestTransformer) rmReq(path string) rootManifestTran...
method setConstraint (line 234) | func (rmt rootManifestTransformer) setConstraint(pr string, c gps.Cons...
method setOverride (line 244) | func (rmt rootManifestTransformer) setOverride(pr string, c gps.Constr...
method addIgnore (line 254) | func (rmt rootManifestTransformer) addIgnore(path string) rootManifest...
FILE: gps/version.go
type VersionType (line 17) | type VersionType
constant IsRevision (line 21) | IsRevision VersionType = iota
constant IsVersion (line 22) | IsVersion
constant IsSemver (line 23) | IsSemver
constant IsBranch (line 24) | IsBranch
type Version (line 39) | type Version interface
type PairedVersion (line 48) | type PairedVersion interface
type UnpairedVersion (line 66) | type UnpairedVersion interface
function NewBranch (line 84) | func NewBranch(body string) UnpairedVersion {
function newDefaultBranch (line 97) | func newDefaultBranch(body string) UnpairedVersion {
function NewVersion (line 106) | func NewVersion(body string) UnpairedVersion {
type Revision (line 116) | type Revision
method String (line 119) | func (r Revision) String() string {
method ImpliedCaretString (line 126) | func (r Revision) ImpliedCaretString() string {
method typedString (line 130) | func (r Revision) typedString() string {
method Type (line 135) | func (r Revision) Type() VersionType {
method Matches (line 141) | func (r Revision) Matches(v Version) bool {
method MatchesAny (line 154) | func (r Revision) MatchesAny(c Constraint) bool {
method Intersect (line 172) | func (r Revision) Intersect(c Constraint) Constraint {
method identical (line 191) | func (r Revision) identical(c Constraint) bool {
method copyTo (line 199) | func (r Revision) copyTo(msg *pb.Constraint) {
type branchVersion (line 204) | type branchVersion struct
method _pair (line 77) | func (branchVersion) _pair(bool) {}
method String (line 209) | func (v branchVersion) String() string {
method ImpliedCaretString (line 213) | func (v branchVersion) ImpliedCaretString() string {
method typedString (line 217) | func (v branchVersion) typedString() string {
method Type (line 221) | func (v branchVersion) Type() VersionType {
method Matches (line 225) | func (v branchVersion) Matches(v2 Version) bool {
method MatchesAny (line 237) | func (v branchVersion) MatchesAny(c Constraint) bool {
method Intersect (line 254) | func (v branchVersion) Intersect(c Constraint) Constraint {
method Pair (line 275) | func (v branchVersion) Pair(r Revision) PairedVersion {
method identical (line 282) | func (v branchVersion) identical(c Constraint) bool {
method copyTo (line 290) | func (v branchVersion) copyTo(msg *pb.Constraint) {
type plainVersion (line 299) | type plainVersion
method _pair (line 78) | func (plainVersion) _pair(bool) {}
method String (line 301) | func (v plainVersion) String() string {
method ImpliedCaretString (line 305) | func (v plainVersion) ImpliedCaretString() string {
method typedString (line 309) | func (v plainVersion) typedString() string {
method Type (line 313) | func (v plainVersion) Type() VersionType {
method Matches (line 317) | func (v plainVersion) Matches(v2 Version) bool {
method MatchesAny (line 329) | func (v plainVersion) MatchesAny(c Constraint) bool {
method Intersect (line 346) | func (v plainVersion) Intersect(c Constraint) Constraint {
method Pair (line 367) | func (v plainVersion) Pair(r Revision) PairedVersion {
method identical (line 374) | func (v plainVersion) identical(c Constraint) bool {
method copyTo (line 382) | func (v plainVersion) copyTo(msg *pb.Constraint) {
type semVersion (line 387) | type semVersion struct
method _pair (line 79) | func (semVersion) _pair(bool) {}
method String (line 391) | func (v semVersion) String() string {
method ImpliedCaretString (line 399) | func (v semVersion) ImpliedCaretString() string {
method typedString (line 403) | func (v semVersion) typedString() string {
method Type (line 407) | func (v semVersion) Type() VersionType {
method Matches (line 411) | func (v semVersion) Matches(v2 Version) bool {
method MatchesAny (line 423) | func (v semVersion) MatchesAny(c Constraint) bool {
method Intersect (line 442) | func (v semVersion) Intersect(c Constraint) Constraint {
method Pair (line 465) | func (v semVersion) Pair(r Revision) PairedVersion {
method identical (line 472) | func (v semVersion) identical(c Constraint) bool {
method copyTo (line 480) | func (v semVersion) copyTo(msg *pb.Constraint) {
type versionPair (line 485) | type versionPair struct
method _pair (line 80) | func (versionPair) _pair(int) {}
method String (line 490) | func (v versionPair) String() string {
method ImpliedCaretString (line 494) | func (v versionPair) ImpliedCaretString() string {
method typedString (line 498) | func (v versionPair) typedString() string {
method Type (line 502) | func (v versionPair) Type() VersionType {
method Revision (line 506) | func (v versionPair) Revision() Revision {
method Unpair (line 510) | func (v versionPair) Unpair() UnpairedVersion {
method Matches (line 514) | func (v versionPair) Matches(v2 Version) bool {
method MatchesAny (line 538) | func (v versionPair) MatchesAny(c2 Constraint) bool {
method Intersect (line 542) | func (v versionPair) Intersect(c2 Constraint) Constraint {
method identical (line 582) | func (v versionPair) identical(c Constraint) bool {
method copyTo (line 593) | func (v versionPair) copyTo(*pb.Constraint) {
function compareVersionType (line 602) | func compareVersionType(l, r Version) int {
function SortForUpgrade (line 671) | func SortForUpgrade(vl []Version) {
function SortPairedForUpgrade (line 677) | func SortPairedForUpgrade(vl []PairedVersion) {
function SortForDowngrade (line 704) | func SortForDowngrade(vl []Version) {
function SortPairedForDowngrade (line 710) | func SortPairedForDowngrade(vl []PairedVersion) {
type upgradeVersionSorter (line 714) | type upgradeVersionSorter
method Len (line 716) | func (vs upgradeVersionSorter) Len() int {
method Swap (line 720) | func (vs upgradeVersionSorter) Swap(i, j int) {
method Less (line 724) | func (vs upgradeVersionSorter) Less(i, j int) bool {
type pvupgradeVersionSorter (line 729) | type pvupgradeVersionSorter
method Len (line 731) | func (vs pvupgradeVersionSorter) Len() int {
method Swap (line 735) | func (vs pvupgradeVersionSorter) Swap(i, j int) {
method Less (line 738) | func (vs pvupgradeVersionSorter) Less(i, j int) bool {
type downgradeVersionSorter (line 743) | type downgradeVersionSorter
method Len (line 745) | func (vs downgradeVersionSorter) Len() int {
method Swap (line 749) | func (vs downgradeVersionSorter) Swap(i, j int) {
method Less (line 753) | func (vs downgradeVersionSorter) Less(i, j int) bool {
type pvdowngradeVersionSorter (line 758) | type pvdowngradeVersionSorter
method Len (line 760) | func (vs pvdowngradeVersionSorter) Len() int {
method Swap (line 764) | func (vs pvdowngradeVersionSorter) Swap(i, j int) {
method Less (line 767) | func (vs pvdowngradeVersionSorter) Less(i, j int) bool {
function vLess (line 772) | func vLess(l, r Version, down bool) bool {
function hidePair (line 821) | func hidePair(pvl []PairedVersion) []Version {
function VersionComponentStrings (line 830) | func VersionComponentStrings(v Version) (revision string, branch string,...
FILE: gps/version_queue.go
type failedVersion (line 12) | type failedVersion struct
type versionQueue (line 17) | type versionQueue struct
method current (line 61) | func (vq *versionQueue) current() Version {
method advance (line 71) | func (vq *versionQueue) advance(fail error) error {
method isExhausted (line 144) | func (vq *versionQueue) isExhausted() bool {
method String (line 151) | func (vq *versionQueue) String() string {
function newVersionQueue (line 28) | func newVersionQueue(id ProjectIdentifier, lockv, prefv Version, b sourc...
FILE: gps/version_queue_test.go
type fakeBridge (line 14) | type fakeBridge struct
method listVersions (line 31) | func (fb *fakeBridge) listVersions(id ProjectIdentifier) ([]Version, e...
function init (line 27) | func init() {
type fakeFailBridge (line 36) | type fakeFailBridge struct
method listVersions (line 42) | func (fb *fakeFailBridge) listVersions(id ProjectIdentifier) ([]Versio...
function TestVersionQueueSetup (line 46) | func TestVersionQueueSetup(t *testing.T) {
function TestVersionQueueAdvance (line 137) | func TestVersionQueueAdvance(t *testing.T) {
FILE: gps/version_test.go
function TestVersionSorts (line 9) | func TestVersionSorts(t *testing.T) {
FILE: hack/licenseok/main.go
constant helpText (line 23) | helpText = `Usage: licenseok [flags] pattern [pattern ...]
constant tmpl (line 31) | tmpl = `The Go Authors. All rights reserved.
type file (line 39) | type file struct
function init (line 44) | func init() {
function main (line 60) | func main() {
function walk (line 105) | func walk(ch chan<- *file, start string) {
function addLicense (line 119) | func addLicense(b []byte, path string, fmode os.FileMode) error {
function hashBang (line 160) | func hashBang(b []byte) []byte {
function hasLicense (line 174) | func hasLicense(b []byte) bool {
function prefix (line 183) | func prefix(top, mid, bot string) ([]byte, error) {
FILE: internal/feedback/feedback.go
constant ConsTypeConstraint (line 17) | ConsTypeConstraint = "constraint"
constant ConsTypeHint (line 20) | ConsTypeHint = "hint"
constant DepTypeDirect (line 23) | DepTypeDirect = "direct dep"
constant DepTypeTransitive (line 27) | DepTypeTransitive = "transitive dep"
constant DepTypeImported (line 30) | DepTypeImported = "imported dep"
type ConstraintFeedback (line 34) | type ConstraintFeedback struct
method LogFeedback (line 76) | func (cf ConstraintFeedback) LogFeedback(logger *log.Logger) {
function NewConstraintFeedback (line 39) | func NewConstraintFeedback(pc gps.ProjectConstraint, depType string) *Co...
function NewLockedProjectFeedback (line 56) | func NewLockedProjectFeedback(lp gps.LockedProject, depType string) *Con...
type brokenImport (line 85) | type brokenImport interface
type modifiedImport (line 89) | type modifiedImport struct
method String (line 94) | func (mi modifiedImport) String() string {
type removedImport (line 125) | type removedImport struct
method String (line 130) | func (ri removedImport) String() string {
type BrokenImportFeedback (line 154) | type BrokenImportFeedback struct
method LogFeedback (line 193) | func (b BrokenImportFeedback) LogFeedback(logger *log.Logger) {
function NewBrokenImportFeedback (line 160) | func NewBrokenImportFeedback(ld *LockDiff) *BrokenImportFeedback {
function GetUsingFeedback (line 203) | func GetUsingFeedback(version, consType, depType, projectPath string) st...
function GetLockingFeedback (line 215) | func GetLockingFeedback(version, revision, depType, projectPath string) ...
function trimSHA (line 228) | func trimSHA(revision string) string {
FILE: internal/feedback/feedback_test.go
function TestFeedback_Constraint (line 17) | func TestFeedback_Constraint(t *testing.T) {
function TestFeedback_LockedProject (line 59) | func TestFeedback_LockedProject(t *testing.T) {
function TestFeedback_BrokenImport (line 97) | func TestFeedback_BrokenImport(t *testing.T) {
FILE: internal/feedback/lockdiff.go
type StringDiff (line 20) | type StringDiff struct
method String (line 25) | func (diff *StringDiff) String() string {
type LockDiff (line 47) | type LockDiff struct
type LockedProjectDiff (line 55) | type LockedProjectDiff struct
function DiffLocks (line 66) | func DiffLocks(l1, l2 gps.Lock) *LockDiff {
function buildLockedProjectDiff (line 131) | func buildLockedProjectDiff(lp gps.LockedProject) LockedProjectDiff {
function DiffProjects (line 165) | func DiffProjects(lp1, lp2 gps.LockedProject) *LockedProjectDiff {
function sortLockedProjects (line 242) | func sortLockedProjects(lps []gps.LockedProject) []gps.LockedProject {
FILE: internal/feedback/lockdiff_test.go
function mkPI (line 19) | func mkPI(root string) gps.ProjectIdentifier {
function TestStringDiff_NoChange (line 25) | func TestStringDiff_NoChange(t *testing.T) {
function TestStringDiff_Add (line 34) | func TestStringDiff_Add(t *testing.T) {
function TestStringDiff_Remove (line 42) | func TestStringDiff_Remove(t *testing.T) {
function TestStringDiff_Modify (line 51) | func TestStringDiff_Modify(t *testing.T) {
function TestDiffProjects_NoChange (line 60) | func TestDiffProjects_NoChange(t *testing.T) {
function TestDiffProjects_Modify (line 70) | func TestDiffProjects_Modify(t *testing.T) {
function TestDiffProjects_AddPackages (line 121) | func TestDiffProjects_AddPackages(t *testing.T) {
function TestDiffProjects_RemovePackages (line 148) | func TestDiffProjects_RemovePackages(t *testing.T) {
function TestDiffLocks_NoChange (line 177) | func TestDiffLocks_NoChange(t *testing.T) {
function TestDiffLocks_AddProjects (line 191) | func TestDiffLocks_AddProjects(t *testing.T) {
function TestDiffLocks_RemoveProjects (line 265) | func TestDiffLocks_RemoveProjects(t *testing.T) {
function TestDiffLocks_ModifyProjects (line 338) | func TestDiffLocks_ModifyProjects(t *testing.T) {
function TestDiffLocks_EmptyInitialLock (line 373) | func TestDiffLocks_EmptyInitialLock(t *testing.T) {
function TestDiffLocks_EmptyFinalLock (line 385) | func TestDiffLocks_EmptyFinalLock(t *testing.T) {
function TestDiffLocks_EmptyLocks (line 397) | func TestDiffLocks_EmptyLocks(t *testing.T) {
FILE: internal/fs/fs.go
function HasFilepathPrefix (line 33) | func HasFilepathPrefix(path, prefix string) (bool, error) {
function EquivalentPaths (line 107) | func EquivalentPaths(p1, p2 string) (bool, error) {
function RenameWithFallback (line 159) | func RenameWithFallback(src, dst string) error {
function renameByCopy (line 175) | func renameByCopy(src, dst string) error {
function IsCaseSensitiveFilesystem (line 215) | func IsCaseSensitiveFilesystem(dir string) (bool, error) {
function genTestFilename (line 245) | func genTestFilename(str string) string {
function ReadActualFilenames (line 276) | func ReadActualFilenames(dirPath string, names []string) (map[string]str...
function CopyDir (line 356) | func CopyDir(src, dst string) error {
function copyFile (line 411) | func copyFile(src, dst string) (err error) {
function cloneSymlink (line 474) | func cloneSymlink(sl, dst string) error {
function EnsureDir (line 487) | func EnsureDir(path string, perm os.FileMode) error {
function IsDir (line 501) | func IsDir(name string) (bool, error) {
function IsNonEmptyDir (line 513) | func IsNonEmptyDir(name string) (bool, error) {
function IsRegular (line 541) | func IsRegular(name string) (bool, error) {
function IsSymlink (line 557) | func IsSymlink(path string) (bool, error) {
function fixLongPath (line 574) | func fixLongPath(path string) string {
function isAbs (line 646) | func isAbs(path string) (b bool) {
function volumeName (line 658) | func volumeName(path string) (v string) {
FILE: internal/fs/fs_test.go
function TestHasFilepathPrefix (line 33) | func TestHasFilepathPrefix(t *testing.T) {
function TestHasFilepathPrefix_Files (line 110) | func TestHasFilepathPrefix_Files(t *testing.T) {
function TestEquivalentPaths (line 155) | func TestEquivalentPaths(t *testing.T) {
function TestRenameWithFallback (line 203) | func TestRenameWithFallback(t *testing.T) {
function TestIsCaseSensitiveFilesystem (line 241) | func TestIsCaseSensitiveFilesystem(t *testing.T) {
function TestReadActualFilenames (line 274) | func TestReadActualFilenames(t *testing.T) {
function TestGenTestFilename (line 354) | func TestGenTestFilename(t *testing.T) {
function BenchmarkGenTestFilename (line 377) | func BenchmarkGenTestFilename(b *testing.B) {
function TestCopyDir (line 393) | func TestCopyDir(t *testing.T) {
function TestCopyDirFail_SrcInaccessible (line 476) | func TestCopyDirFail_SrcInaccessible(t *testing.T) {
function TestCopyDirFail_DstInaccessible (line 504) | func TestCopyDirFail_DstInaccessible(t *testing.T) {
function TestCopyDirFail_SrcIsNotDir (line 536) | func TestCopyDirFail_SrcIsNotDir(t *testing.T) {
function TestCopyDirFail_DstExists (line 562) | func TestCopyDirFail_DstExists(t *testing.T) {
function TestCopyDirFailOpen (line 590) | func TestCopyDirFailOpen(t *testing.T) {
function TestCopyFile (line 633) | func TestCopyFile(t *testing.T) {
function TestCopyFileSymlink (line 680) | func TestCopyFileSymlink(t *testing.T) {
function TestCopyFileLongFilePath (line 728) | func TestCopyFileLongFilePath(t *testing.T) {
function TestCopyFileFail (line 760) | func TestCopyFileFail(t *testing.T) {
function setupInaccessibleDir (line 807) | func setupInaccessibleDir(t *testing.T, op func(dir string) error) func() {
function TestEnsureDir (line 846) | func TestEnsureDir(t *testing.T) {
function TestIsRegular (line 897) | func TestIsRegular(t *testing.T) {
function TestIsDir (line 957) | func TestIsDir(t *testing.T) {
function TestIsNonEmptyDir (line 1002) | func TestIsNonEmptyDir(t *testing.T) {
function TestIsSymlink (line 1057) | func TestIsSymlink(t *testing.T) {
FILE: internal/fs/rename.go
function renameFallback (line 18) | func renameFallback(err error, src, dst string) error {
FILE: internal/fs/rename_windows.go
function renameFallback (line 18) | func renameFallback(err error, src, dst string) error {
FILE: internal/importers/base/importer.go
type Importer (line 19) | type Importer struct
method isTag (line 39) | func (i *Importer) isTag(pi gps.ProjectIdentifier, value string) (bool...
method lookupVersionForLockedProject (line 62) | func (i *Importer) lookupVersionForLockedProject(pi gps.ProjectIdentif...
method loadPackages (line 126) | func (i *Importer) loadPackages(packages []ImportedPackage) []imported...
method ImportPackages (line 180) | func (i *Importer) ImportPackages(packages []ImportedPackage, defaultC...
method isConstraintPinned (line 277) | func (i *Importer) isConstraintPinned(c gps.Constraint) bool {
method testConstraint (line 288) | func (i *Importer) testConstraint(c gps.Constraint, v gps.Version) bool {
method convertToConstraint (line 302) | func (i *Importer) convertToConstraint(v gps.Version) gps.Constraint {
method isDefaultSource (line 315) | func (i *Importer) isDefaultSource(projectRoot gps.ProjectRoot, source...
function NewImporter (line 28) | func NewImporter(logger *log.Logger, verbose bool, sm gps.SourceManager)...
type ImportedPackage (line 104) | type ImportedPackage struct
type importedProject (line 120) | type importedProject struct
FILE: internal/importers/base/importer_test.go
function TestBaseImporter_IsTag (line 18) | func TestBaseImporter_IsTag(t *testing.T) {
function TestBaseImporter_LookupVersionForLockedProject (line 81) | func TestBaseImporter_LookupVersionForLockedProject(t *testing.T) {
function TestBaseImporter_ImportProjects (line 145) | func TestBaseImporter_ImportProjects(t *testing.T) {
FILE: internal/importers/glide/importer.go
constant glideYamlName (line 23) | glideYamlName = "glide.yaml"
constant glideLockName (line 24) | glideLockName = "glide.lock"
type Importer (line 27) | type Importer struct
method Name (line 70) | func (g *Importer) Name() string {
method HasDepMetadata (line 75) | func (g *Importer) HasDepMetadata(dir string) bool {
method Import (line 86) | func (g *Importer) Import(dir string, pr gps.ProjectRoot) (*dep.Manife...
method load (line 99) | func (g *Importer) load(projectDir string) error {
method convert (line 138) | func (g *Importer) convert(pr gps.ProjectRoot) (*dep.Manifest, *dep.Lo...
function NewImporter (line 35) | func NewImporter(logger *log.Logger, verbose bool, sm gps.SourceManager)...
type glideYaml (line 39) | type glideYaml struct
type glideLock (line 47) | type glideLock struct
type glidePackage (line 52) | type glidePackage struct
type glideLockedPackage (line 63) | type glideLockedPackage struct
FILE: internal/importers/glide/importer_test.go
function TestGlideConfig_Convert (line 20) | func TestGlideConfig_Convert(t *testing.T) {
function TestGlideConfig_Import (line 176) | func TestGlideConfig_Import(t *testing.T) {
FILE: internal/importers/glock/importer.go
constant glockfile (line 21) | glockfile = "GLOCKFILE"
type Importer (line 24) | type Importer struct
method Name (line 36) | func (g *Importer) Name() string {
method HasDepMetadata (line 41) | func (g *Importer) HasDepMetadata(dir string) bool {
method Import (line 51) | func (g *Importer) Import(dir string, pr gps.ProjectRoot) (*dep.Manife...
method load (line 66) | func (g *Importer) load(projectDir string) error {
method convert (line 119) | func (g *Importer) convert(pr gps.ProjectRoot) (*dep.Manifest, *dep.Lo...
function NewImporter (line 31) | func NewImporter(logger *log.Logger, verbose bool, sm gps.SourceManager)...
type glockPackage (line 61) | type glockPackage struct
function parseGlockLine (line 99) | func parseGlockLine(line string) (*glockPackage, error) {
FILE: internal/importers/glock/importer_test.go
function TestGlockConfig_Convert (line 21) | func TestGlockConfig_Convert(t *testing.T) {
function TestGlockConfig_LoadInvalid (line 73) | func TestGlockConfig_LoadInvalid(t *testing.T) {
function TestGlockConfig_LoadEmptyLine (line 82) | func TestGlockConfig_LoadEmptyLine(t *testing.T) {
function TestGlockConfig_Import (line 92) | func TestGlockConfig_Import(t *testing.T) {
FILE: internal/importers/godep/importer.go
constant godepPath (line 21) | godepPath = "Godeps" + string(os.PathSeparator) + "Godeps.json"
type Importer (line 24) | type Importer struct
method Name (line 46) | func (g *Importer) Name() string {
method HasDepMetadata (line 51) | func (g *Importer) HasDepMetadata(dir string) bool {
method Import (line 61) | func (g *Importer) Import(dir string, pr gps.ProjectRoot) (*dep.Manife...
method load (line 71) | func (g *Importer) load(projectDir string) error {
method convert (line 89) | func (g *Importer) convert(pr gps.ProjectRoot) (*dep.Manifest, *dep.Lo...
function NewImporter (line 30) | func NewImporter(logger *log.Logger, verbose bool, sm gps.SourceManager)...
type godepJSON (line 34) | type godepJSON struct
type godepPackage (line 39) | type godepPackage struct
FILE: internal/importers/godep/importer_test.go
function TestGodepConfig_Convert (line 21) | func TestGodepConfig_Convert(t *testing.T) {
function TestGodepConfig_Import (line 114) | func TestGodepConfig_Import(t *testing.T) {
function TestGodepConfig_JsonLoad (line 166) | func TestGodepConfig_JsonLoad(t *testing.T) {
function equalImports (line 204) | func equalImports(a, b []godepPackage) bool {
FILE: internal/importers/govend/importer.go
constant govendYAMLName (line 22) | govendYAMLName = "vendor.yml"
type Importer (line 25) | type Importer struct
method Name (line 45) | func (g *Importer) Name() string {
method HasDepMetadata (line 50) | func (g *Importer) HasDepMetadata(dir string) bool {
method Import (line 60) | func (g *Importer) Import(dir string, pr gps.ProjectRoot) (*dep.Manife...
method load (line 71) | func (g *Importer) load(projectDir string) error {
method convert (line 89) | func (g *Importer) convert(pr gps.ProjectRoot) (*dep.Manifest, *dep.Lo...
function NewImporter (line 31) | func NewImporter(logger *log.Logger, verbose bool, sm gps.SourceManager)...
type govendYAML (line 35) | type govendYAML struct
type govendPackage (line 39) | type govendPackage struct
FILE: internal/importers/govend/importer_test.go
function TestGovendConfig_Convert (line 21) | func TestGovendConfig_Convert(t *testing.T) {
function TestGovendConfig_Import (line 88) | func TestGovendConfig_Import(t *testing.T) {
function TestGovendConfig_YAMLLoad (line 139) | func TestGovendConfig_YAMLLoad(t *testing.T) {
function equalGovendImports (line 172) | func equalGovendImports(a, b []govendPackage) bool {
FILE: internal/importers/govendor/importer.go
constant govendorDir (line 22) | govendorDir = "vendor"
constant govendorName (line 23) | govendorName = "vendor.json"
type Importer (line 26) | type Importer struct
method Name (line 54) | func (g *Importer) Name() string {
method HasDepMetadata (line 59) | func (g *Importer) HasDepMetadata(dir string) bool {
method Import (line 68) | func (g *Importer) Import(dir string, pr gps.ProjectRoot) (*dep.Manife...
method load (line 78) | func (g *Importer) load(projectDir string) error {
method convert (line 95) | func (g *Importer) convert(pr gps.ProjectRoot) (*dep.Manifest, *dep.Lo...
function NewImporter (line 33) | func NewImporter(logger *log.Logger, verbose bool, sm gps.SourceManager)...
type govendorFile (line 38) | type govendorFile struct
type govendorPackage (line 45) | type govendorPackage struct
FILE: internal/importers/govendor/importer_test.go
constant testGovendorProjectRoot (line 20) | testGovendorProjectRoot = "github.com/golang/notexist"
function TestGovendorConfig_Import (line 22) | func TestGovendorConfig_Import(t *testing.T) {
function TestGovendorConfig_Convert (line 69) | func TestGovendorConfig_Convert(t *testing.T) {
FILE: internal/importers/gvt/importer.go
constant gvtPath (line 20) | gvtPath = "vendor" + string(os.PathSeparator) + "manifest"
type Importer (line 23) | type Importer struct
method Name (line 45) | func (g *Importer) Name() string {
method HasDepMetadata (line 50) | func (g *Importer) HasDepMetadata(dir string) bool {
method Import (line 60) | func (g *Importer) Import(dir string, pr gps.ProjectRoot) (*dep.Manife...
method load (line 70) | func (g *Importer) load(projectDir string) error {
method convert (line 88) | func (g *Importer) convert(pr gps.ProjectRoot) (*dep.Manifest, *dep.Lo...
function NewImporter (line 29) | func NewImporter(logger *log.Logger, verbose bool, sm gps.SourceManager)...
type gvtManifest (line 33) | type gvtManifest struct
type gvtPkg (line 37) | type gvtPkg struct
FILE: internal/importers/gvt/importer_test.go
function TestGvtConfig_Convert (line 21) | func TestGvtConfig_Convert(t *testing.T) {
function TestGvtConfig_Import (line 132) | func TestGvtConfig_Import(t *testing.T) {
function TestGvtConfig_JsonLoad (line 184) | func TestGvtConfig_JsonLoad(t *testing.T) {
function equalImports (line 228) | func equalImports(a, b []gvtPkg) bool {
FILE: internal/importers/importers.go
type Importer (line 23) | type Importer interface
function BuildAll (line 35) | func BuildAll(logger *log.Logger, verbose bool, sm gps.SourceManager) []...
FILE: internal/importers/importertest/testcase.go
type TestCase (line 23) | type TestCase struct
method Execute (line 48) | func (tc TestCase) Execute(t *testing.T, convert func(logger *log.Logg...
method validate (line 69) | func (tc TestCase) validate(manifest *dep.Manifest, lock *dep.Lock, ou...
function NewTestContext (line 35) | func NewTestContext(h *test.Helper) *dep.Ctx {
function equalSlice (line 169) | func equalSlice(a, b []string) bool {
FILE: internal/importers/importertest/testdata.go
constant RootProject (line 9) | RootProject = "github.com/golang/notexist"
constant Project (line 12) | Project = "github.com/carolynvs/deptest-importers"
constant ProjectSrc (line 15) | ProjectSrc = "https://github.com/carolynvs/deptest-importers.git"
constant UntaggedRev (line 18) | UntaggedRev = "9b670d143bfb4a00f7461451d5c4a62f80e9d11d"
constant UntaggedRevAbbrv (line 21) | UntaggedRevAbbrv = "v1.0.0-1-g9b670d1"
constant Beta1Tag (line 24) | Beta1Tag = "beta1"
constant Beta1Rev (line 27) | Beta1Rev = "7913ab26988c6fb1e16225f845a178e8849dd254"
constant V2Branch (line 30) | V2Branch = "v2"
constant V2Rev (line 33) | V2Rev = "45dcf5a09c64b48b6e836028a3bc672b19b9d11d"
constant V2PatchTag (line 36) | V2PatchTag = "v2.0.0-alpha1"
constant V2PatchRev (line 39) | V2PatchRev = "347760b50204948ea63e531dd6560e56a9adde8f"
constant V1Tag (line 42) | V1Tag = "v1.0.0"
constant V1Rev (line 45) | V1Rev = "d0c29640b17f77426b111f4c1640d716591aa70e"
constant V1PatchTag (line 48) | V1PatchTag = "v1.0.2"
constant V1PatchRev (line 51) | V1PatchRev = "788963efe22e3e6e24c776a11a57468bb2fcd780"
constant V1Constraint (line 54) | V1Constraint = "^1.0.0"
constant MultiTaggedRev (line 57) | MultiTaggedRev = "34cf993cc346f65601fe4356dd68bd54d20a1bfe"
constant MultiTaggedSemverTag (line 60) | MultiTaggedSemverTag = "v1.0.4"
constant MultiTaggedPlainTag (line 63) | MultiTaggedPlainTag = "stable"
constant NonexistentPrj (line 66) | NonexistentPrj = "github.com/nonexistent/project"
FILE: internal/importers/vndr/importer.go
function vndrFile (line 20) | func vndrFile(dir string) string {
type Importer (line 25) | type Importer struct
method Name (line 36) | func (v *Importer) Name() string { return "vndr" }
method HasDepMetadata (line 39) | func (v *Importer) HasDepMetadata(dir string) bool {
method Import (line 45) | func (v *Importer) Import(dir string, pr gps.ProjectRoot) (*dep.Manife...
method loadVndrFile (line 57) | func (v *Importer) loadVndrFile(dir string) error {
method convert (line 88) | func (v *Importer) convert(pr gps.ProjectRoot) (*dep.Manifest, *dep.Lo...
function NewImporter (line 31) | func NewImporter(log *log.Logger, verbose bool, sm gps.SourceManager) *I...
type vndrPackage (line 117) | type vndrPackage struct
function parseVndrLine (line 123) | func parseVndrLine(line string) (*vndrPackage, error) {
FILE: internal/importers/vndr/importer_test.go
function TestVndrConfig_Convert (line 22) | func TestVndrConfig_Convert(t *testing.T) {
function TestVndrConfig_Import (line 77) | func TestVndrConfig_Import(t *testing.T) {
function TestParseVndrLine (line 152) | func TestParseVndrLine(t *testing.T) {
FILE: internal/test/integration/testcase.go
type TestCase (line 20) | type TestCase struct
method InitialPath (line 64) | func (tc *TestCase) InitialPath() string {
method UpdateFile (line 69) | func (tc *TestCase) UpdateFile(goldenPath, workingPath string) {
method CompareFile (line 89) | func (tc *TestCase) CompareFile(goldenPath, working string) {
method UpdateOutput (line 113) | func (tc *TestCase) UpdateOutput(stdout string) {
method CompareOutput (line 130) | func (tc *TestCase) CompareOutput(stdout string) {
method CompareError (line 158) | func (tc *TestCase) CompareError(err error, stderr string) {
method CompareCmdFailure (line 179) | func (tc *TestCase) CompareCmdFailure(gotFail bool) {
method CompareVendorPaths (line 192) | func (tc *TestCase) CompareVendorPaths(gotVendorPaths []string) {
method WriteFile (line 209) | func (tc *TestCase) WriteFile(src string, content string) error {
function NewTestCase (line 38) | func NewTestCase(t *testing.T, dir, name string) *TestCase {
function normalizeLines (line 149) | func normalizeLines(s string) string {
function getFile (line 213) | func getFile(path string) (bool, string, error) {
FILE: internal/test/integration/testproj.go
constant projectRoot (line 24) | projectRoot = "src/github.com/golang/notexist"
type RunFunc (line 28) | type RunFunc
type TestProject (line 32) | type TestProject struct
method Cleanup (line 68) | func (p *TestProject) Cleanup() {
method Path (line 73) | func (p *TestProject) Path(args ...string) string {
method ProjPath (line 78) | func (p *TestProject) ProjPath(args ...string) string {
method TempDir (line 84) | func (p *TestProject) TempDir(args ...string) {
method TempProjDir (line 92) | func (p *TestProject) TempProjDir(args ...string) {
method VendorPath (line 98) | func (p *TestProject) VendorPath(args ...string) string {
method RunGo (line 105) | func (p *TestProject) RunGo(args ...string) {
method RunGit (line 129) | func (p *TestProject) RunGit(dir string, args ...string) {
method GetStdout (line 155) | func (p *TestProject) GetStdout() string {
method GetStderr (line 160) | func (p *TestProject) GetStderr() string {
method GetVendorGit (line 165) | func (p *TestProject) GetVendorGit(ip string) {
method DoRun (line 173) | func (p *TestProject) DoRun(args []string) error {
method CopyTree (line 201) | func (p *TestProject) CopyTree(src string) {
method GetVendorPaths (line 234) | func (p *TestProject) GetVendorPaths() []string {
method GetImportPaths (line 255) | func (p *TestProject) GetImportPaths() []string {
method RecordImportPaths (line 276) | func (p *TestProject) RecordImportPaths() {
method CompareImportPaths (line 281) | func (p *TestProject) CompareImportPaths() {
method makeRootTempDir (line 296) | func (p *TestProject) makeRootTempDir() {
method Setenv (line 312) | func (p *TestProject) Setenv(name, val string) {
method Must (line 317) | func (p *TestProject) Must(err error) {
function NewTestProject (line 44) | func NewTestProject(t *testing.T, initPath, wd string, run RunFunc) *Tes...
function copyFile (line 217) | func copyFile(dest, src string) {
FILE: internal/test/test.go
constant manifestName (line 39) | manifestName = "Gopkg.toml"
constant lockName (line 40) | lockName = "Gopkg.lock"
function init (line 43) | func init() {
type Helper (line 51) | type Helper struct
method Must (line 73) | func (h *Helper) Must(err error) {
method check (line 80) | func (h *Helper) check(err error) {
method Parallel (line 87) | func (h *Helper) Parallel() {
method pwd (line 107) | func (h *Helper) pwd() string {
method Cd (line 118) | func (h *Helper) Cd(dir string) {
method Setenv (line 136) | func (h *Helper) Setenv(name, val string) {
method unsetenv (line 145) | func (h *Helper) unsetenv(name string) {
method DoRun (line 159) | func (h *Helper) DoRun(args []string) error {
method Run (line 203) | func (h *Helper) Run(args ...string) {
method runFail (line 215) | func (h *Helper) runFail(args ...string) {
method RunGo (line 224) | func (h *Helper) RunGo(args ...string) {
method RunGit (line 264) | func (h *Helper) RunGit(dir string, args ...string) {
method getStdout (line 290) | func (h *Helper) getStdout() string {
method getStderr (line 298) | func (h *Helper) getStderr() string {
method doGrepMatch (line 308) | func (h *Helper) doGrepMatch(match string, b *bytes.Buffer) bool {
method doGrep (line 325) | func (h *Helper) doGrep(match string, b *bytes.Buffer, name, msg strin...
method grepStdout (line 335) | func (h *Helper) grepStdout(match, msg string) {
method grepStderr (line 341) | func (h *Helper) grepStderr(match, msg string) {
method grepBoth (line 347) | func (h *Helper) grepBoth(match, msg string) {
method doGrepNot (line 357) | func (h *Helper) doGrepNot(match string, b *bytes.Buffer, name, msg st...
method grepStdoutNot (line 367) | func (h *Helper) grepStdoutNot(match, msg string) {
method grepStderrNot (line 373) | func (h *Helper) grepStderrNot(match, msg string) {
method grepBothNot (line 380) | func (h *Helper) grepBothNot(match, msg string) {
method doGrepCount (line 388) | func (h *Helper) doGrepCount(match string, b *bytes.Buffer) int {
method grepCountBoth (line 404) | func (h *Helper) grepCountBoth(match string) int {
method creatingTemp (line 412) | func (h *Helper) creatingTemp(path string) {
method makeTempdir (line 428) | func (h *Helper) makeTempdir() {
method TempFile (line 437) | func (h *Helper) TempFile(path, contents string) {
method WriteTestFile (line 452) | func (h *Helper) WriteTestFile(src string, content string) error {
method GetFile (line 458) | func (h *Helper) GetFile(path string) io.ReadCloser {
method GetTestFile (line 468) | func (h *Helper) GetTestFile(src string) io.ReadCloser {
method GetTestFileString (line 475) | func (h *Helper) GetTestFileString(src string) string {
method TempCopy (line 488) | func (h *Helper) TempCopy(dest, src string) {
method TempDir (line 501) | func (h *Helper) TempDir(path string) {
method Path (line 511) | func (h *Helper) Path(name string) string {
method MustExist (line 532) | func (h *Helper) MustExist(path string) {
method ShouldExist (line 539) | func (h *Helper) ShouldExist(path string) error {
method Exist (line 548) | func (h *Helper) Exist(path string) bool {
method MustNotExist (line 560) | func (h *Helper) MustNotExist(path string) {
method ShouldNotExist (line 567) | func (h *Helper) ShouldNotExist(path string) error {
method Cleanup (line 576) | func (h *Helper) Cleanup() {
method ReadManifest (line 600) | func (h *Helper) ReadManifest() string {
method ReadLock (line 610) | func (h *Helper) ReadLock() string {
method GetCommit (line 621) | func (h *Helper) GetCommit(repo string) string {
function NewHelper (line 64) | func NewHelper(t *testing.T) *Helper {
function NeedsExternalNetwork (line 249) | func NeedsExternalNetwork(t *testing.T) {
function NeedsGit (line 257) | func NeedsGit(t *testing.T) {
FILE: internal/test/writer.go
type Writer (line 14) | type Writer struct
method Write (line 18) | func (t Writer) Write(b []byte) (n int, err error) {
FILE: lock.go
constant LockName (line 19) | LockName = "Gopkg.lock"
type Lock (line 22) | type Lock struct
method Projects (line 133) | func (l *Lock) Projects() []gps.LockedProject {
method InputImports (line 142) | func (l *Lock) InputImports() []string {
method HasProjectWithRoot (line 153) | func (l *Lock) HasProjectWithRoot(root gps.ProjectRoot) bool {
method dup (line 163) | func (l *Lock) dup() *Lock {
method toRaw (line 177) | func (l *Lock) toRaw() rawLock {
method MarshalTOML (line 219) | func (l *Lock) MarshalTOML() ([]byte, error) {
type SolveMeta (line 29) | type SolveMeta struct
type rawLock (line 37) | type rawLock struct
type solveMeta (line 42) | type solveMeta struct
type rawLockedProject (line 50) | type rawLockedProject struct
function readLock (line 61) | func readLock(r io.Reader) (*Lock, error) {
function fromRawLock (line 77) | func fromRawLock(raw rawLock) (*Lock, error) {
function LockFromSolution (line 233) | func LockFromSolution(in gps.Solution, prune gps.CascadingPruneOptions) ...
FILE: lock_test.go
function TestReadLock (line 17) | func TestReadLock(t *testing.T) {
function TestWriteLock (line 82) | func TestWriteLock(t *testing.T) {
function TestReadLockErrors (line 155) | func TestReadLockErrors(t *testing.T) {
FILE: manifest.go
constant ManifestName (line 23) | ManifestName = "Gopkg.toml"
type Manifest (line 48) | type Manifest struct
method MarshalTOML (line 528) | func (m *Manifest) MarshalTOML() ([]byte, error) {
method toRaw (line 537) | func (m *Manifest) toRaw() rawManifest {
method DependencyConstraints (line 610) | func (m *Manifest) DependencyConstraints() gps.ProjectConstraints {
method Overrides (line 615) | func (m *Manifest) Overrides() gps.ProjectConstraints {
method IgnoredPackages (line 620) | func (m *Manifest) IgnoredPackages() *pkgtree.IgnoredRuleset {
method HasConstraintsOn (line 629) | func (m *Manifest) HasConstraintsOn(root gps.ProjectRoot) bool {
method RequiredPackages (line 641) | func (m *Manifest) RequiredPackages() map[string]bool {
type rawManifest (line 60) | type rawManifest struct
type rawProject (line 69) | type rawProject struct
type rawPruneOptions (line 77) | type rawPruneOptions struct
constant pruneOptionUnusedPackages (line 87) | pruneOptionUnusedPackages = "unused-packages"
constant pruneOptionGoTests (line 88) | pruneOptionGoTests = "go-tests"
constant pruneOptionNonGo (line 89) | pruneOptionNonGo = "non-go"
constant pvnone (line 94) | pvnone uint8 = 0
constant pvtrue (line 95) | pvtrue uint8 = 1
constant pvfalse (line 96) | pvfalse uint8 = 2
function NewManifest (line 100) | func NewManifest() *Manifest {
function validateManifest (line 111) | func validateManifest(s string) ([]error, error) {
function validatePruneOptions (line 226) | func validatePruneOptions(val interface{}, root bool) (warns []error, er...
function checkRedundantPruneOptions (line 273) | func checkRedundantPruneOptions(co gps.CascadingPruneOptions) (warns []e...
function ValidateProjectRoots (line 298) | func ValidateProjectRoots(c *Ctx, m *Manifest, sm gps.SourceManager) err...
function readManifest (line 344) | func readManifest(r io.Reader) (*Manifest, []error, error) {
function fromRawManifest (line 371) | func fromRawManifest(raw rawManifest, buf *bytes.Buffer) (*Manifest, err...
function fromRawPruneOptions (line 419) | func fromRawPruneOptions(prunemap map[string]interface{}) gps.CascadingP...
function toRawPruneOptions (line 472) | func toRawPruneOptions(co gps.CascadingPruneOptions) rawPruneOptions {
function toProject (line 496) | func toProject(raw rawProject) (n gps.ProjectRoot, pp gps.ProjectPropert...
type sortedRawProjects (line 561) | type sortedRawProjects
method Len (line 563) | func (s sortedRawProjects) Len() int { return len(s) }
method Swap (line 564) | func (s sortedRawProjects) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
method Less (line 565) | func (s sortedRawProjects) Less(i, j int) bool {
function toRawProject (line 578) | func toRawProject(name gps.ProjectRoot, project gps.ProjectProperties) r...
FILE: manifest_test.go
function TestReadManifest (line 21) | func TestReadManifest(t *testing.T) {
function TestWriteManifest (line 70) | func TestWriteManifest(t *testing.T) {
function TestReadManifestErrors (line 110) | func TestReadManifestErrors(t *testing.T) {
function TestValidateManifest (line 136) | func TestValidateManifest(t *testing.T) {
function TestCheckRedundantPruneOptions (line 468) | func TestCheckRedundantPruneOptions(t *testing.T) {
function TestValidateProjectRoots (line 554) | func TestValidateProjectRoots(t *testing.T) {
function TestToRawPruneOptions (line 760) | func TestToRawPruneOptions(t *testing.T) {
function TestToRawPruneOptions_Panic (line 797) | func TestToRawPruneOptions_Panic(t *testing.T) {
function containsErr (line 814) | func containsErr(s []error, e error) bool {
FILE: project.go
function findProjectRoot (line 28) | func findProjectRoot(from string) (string, error) {
function checkGopkgFilenames (line 58) | func checkGopkgFilenames(projectRoot string) error {
type Project (line 98) | type Project struct
method VerifyVendor (line 133) | func (p *Project) VerifyVendor() (map[string]verify.VendorStatus, erro...
method SetRoot (line 155) | func (p *Project) SetRoot(root string) error {
method MakeParams (line 167) | func (p *Project) MakeParams() gps.SolveParameters {
method parseRootPackageTree (line 192) | func (p *Project) parseRootPackageTree() (pkgtree.PackageTree, error) {
method GetDirectDependencyNames (line 224) | func (p *Project) GetDirectDependencyNames(sm gps.SourceManager) (map[...
method FindIneffectualConstraints (line 254) | func (p *Project) FindIneffectualConstraints(sm gps.SourceManager) []g...
function BackupVendor (line 279) | func BackupVendor(vpath, suffix string) (string, error) {
FILE: project_test.go
function TestFindRoot (line 19) | func TestFindRoot(t *testing.T) {
function TestCheckGopkgFilenames (line 66) | func TestCheckGopkgFilenames(t *testing.T) {
function TestProjectMakeParams (line 141) | func TestProjectMakeParams(t *testing.T) {
function TestBackupVendor (line 164) | func TestBackupVendor(t *testing.T) {
FILE: test_project_context_test.go
type TestProjectContext (line 16) | type TestProjectContext struct
method CopyFile (line 54) | func (pc *TestProjectContext) CopyFile(projectPath string, testdataPat...
method Load (line 60) | func (pc *TestProjectContext) Load() {
method getLockPath (line 88) | func (pc *TestProjectContext) getLockPath() string {
method getManifestPath (line 93) | func (pc *TestProjectContext) getManifestPath() string {
method getVendorPath (line 98) | func (pc *TestProjectContext) getVendorPath() string {
method LockShouldMatchGolden (line 105) | func (pc *TestProjectContext) LockShouldMatchGolden(goldenLockPath str...
method LockShouldNotExist (line 111) | func (pc *TestProjectContext) LockShouldNotExist() error {
method ManifestShouldMatchGolden (line 118) | func (pc *TestProjectContext) ManifestShouldMatchGolden(goldenManifest...
method ManifestShouldNotExist (line 124) | func (pc *TestProjectContext) ManifestShouldNotExist() error {
method ShouldMatchGolden (line 131) | func (pc *TestProjectContext) ShouldMatchGolden(goldenFile string, got...
method VendorShouldExist (line 147) | func (pc *TestProjectContext) VendorShouldExist() error {
method VendorFileShouldExist (line 153) | func (pc *TestProjectContext) VendorFileShouldExist(filePath string) e...
method VendorShouldNotExist (line 159) | func (pc *TestProjectContext) VendorShouldNotExist() error {
method Release (line 164) | func (pc *TestProjectContext) Release() {
function NewTestProjectContext (line 27) | func NewTestProjectContext(h *test.Helper, projectName string) *TestProj...
FILE: txn_writer.go
constant anyExceptHash (line 24) | anyExceptHash verify.DeltaDimension = verify.AnyChanged & ^verify.HashVe...
type SafeWriter (line 69) | type SafeWriter struct
method HasLock (line 139) | func (sw *SafeWriter) HasLock() bool {
method HasManifest (line 144) | func (sw *SafeWriter) HasManifest() bool {
method validate (line 162) | func (sw SafeWriter) validate(root string, sm gps.SourceManager) error {
method Write (line 190) | func (sw *SafeWriter) Write(root string, sm gps.SourceManager, example...
method PrintPreparedActions (line 362) | func (sw *SafeWriter) PrintPreparedActions(output *log.Logger, verbose...
function NewSafeWriter (line 93) | func NewSafeWriter(manifest *Manifest, oldLock, newLock *Lock, vendor Ve...
type VendorBehavior (line 149) | type VendorBehavior
constant VendorOnChanged (line 155) | VendorOnChanged VendorBehavior = iota
constant VendorAlways (line 157) | VendorAlways
constant VendorNever (line 159) | VendorNever
function hasDotGit (line 406) | func hasDotGit(path string) bool {
type DeltaWriter (line 415) | type DeltaWriter struct
method Write (line 545) | func (dw *DeltaWriter) Write(path string, sm gps.SourceManager, exampl...
method PrintPreparedActions (line 752) | func (dw *DeltaWriter) PrintPreparedActions(output *log.Logger, verbos...
type changeType (line 423) | type changeType
constant hashMismatch (line 426) | hashMismatch changeType = iota + 1
constant hashVersionMismatch (line 427) | hashVersionMismatch
constant hashAbsent (line 428) | hashAbsent
constant noVerify (line 429) | noVerify
constant solveChanged (line 430) | solveChanged
constant pruneOptsChanged (line 431) | pruneOptsChanged
constant missingFromTree (line 432) | missingFromTree
constant projectAdded (line 433) | projectAdded
constant projectRemoved (line 434) | projectRemoved
constant pathPreserved (line 435) | pathPreserved
function NewDeltaWriter (line 442) | func NewDeltaWriter(p *Project, newLock *Lock, behavior VendorBehavior) ...
function changeExplanation (line 704) | func changeExplanation(c changeType, lpd verify.LockedProjectDelta) stri...
type TreeWriter (line 787) | type TreeWriter interface
function trimSHA (line 793) | func trimSHA(revision gps.Revision) string {
FILE: txn_writer_test.go
constant safeWriterProject (line 19) | safeWriterProject = "safewritertest"
constant safeWriterGoldenManifest (line 20) | safeWriterGoldenManifest = "txn_writer/expected_manifest.toml"
constant safeWriterGoldenLock (line 21) | safeWriterGoldenLock = "txn_writer/expected_lock.toml"
function defaultCascadingPruneOptions (line 23) | func defaultCascadingPruneOptions() gps.CascadingPruneOptions {
function TestSafeWriter_BadInput_MissingRoot (line 30) | func TestSafeWriter_BadInput_MissingRoot(t *testing.T) {
function TestSafeWriter_BadInput_MissingSourceManager (line 46) | func TestSafeWriter_BadInput_MissingSourceManager(t *testing.T) {
function TestSafeWriter_BadInput_ForceVendorMissingLock (line 64) | func TestSafeWriter_BadInput_ForceVendorMissingLock(t *testing.T) {
function TestSafeWriter_BadInput_OldLockOnly (line 78) | func TestSafeWriter_BadInput_OldLockOnly(t *testing.T) {
function TestSafeWriter_BadInput_NonexistentRoot (line 94) | func TestSafeWriter_BadInput_NonexistentRoot(t *testing.T) {
function TestSafeWriter_BadInput_RootIsFile (line 112) | func TestSafeWriter_BadInput_RootIsFile(t *testing.T) {
function TestSafeWriter_Manifest (line 130) | func TestSafeWriter_Manifest(t *testing.T) {
function TestSafeWriter_ManifestAndUnmodifiedLock (line 171) | func TestSafeWriter_ManifestAndUnmodifiedLock(t *testing.T) {
function TestSafeWriter_ManifestAndUnmodifiedLockWithForceVendor (line 216) | func TestSafeWriter_ManifestAndUnmodifiedLockWithForceVendor(t *testing....
function TestSafeWriter_ForceVendorWhenVendorAlreadyExists (line 264) | func TestSafeWriter_ForceVendorWhenVendorAlreadyExists(t *testing.T) {
function TestSafeWriter_NewLock (line 313) | func TestSafeWriter_NewLock(t *testing.T) {
function TestSafeWriter_NewLockSkipVendor (line 360) | func TestSafeWriter_NewLockSkipVendor(t *testing.T) {
function TestHasDotGit (line 407) | func TestHasDotGit(t *testing.T) {
function TestSafeWriter_VendorDotGitPreservedWithForceVendor (line 421) | func TestSafeWriter_VendorDotGitPreservedWithForceVendor(t *testing.T) {
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/constraints.go
constant cvRegex (line 14) | cvRegex string = `v?([0-9|x|X|\*]+)(\.[0-9|x|X|\*]+)?(\.[0-9|x|X|\*]+)?` +
function init (line 18) | func init() {
type Constraint (line 51) | type Constraint interface
type realConstraint (line 93) | type realConstraint interface
type ccache (line 104) | type ccache struct
function NewConstraint (line 116) | func NewConstraint(in string) (Constraint, error) {
function NewConstraintIC (line 122) | func NewConstraintIC(in string) (Constraint, error) {
function newConstraint (line 126) | func newConstraint(in string, ic bool, cache map[string]ccache) (Constra...
function Intersection (line 177) | func Intersection(cg ...Constraint) Constraint {
function Union (line 205) | func Union(cg ...Constraint) Constraint {
FILE: vendor/github.com/Masterminds/semver/error.go
constant rerrLT (line 18) | rerrLT = iota
constant rerrLTE (line 19) | rerrLTE
constant rerrGT (line 20) | rerrGT
constant rerrGTE (line 21) | rerrGTE
constant rerrNE (line 22) | rerrNE
constant rerrPre (line 23) | rerrPre
type MatchFailure (line 27) | type MatchFailure interface
type RangeMatchFailure (line 36) | type RangeMatchFailure struct
method Error (line 42) | func (rce RangeMatchFailure) Error() string {
method Pair (line 48) | func (rce RangeMatchFailure) Pair() (v Version, r Constraint) {
type VersionMatchFailure (line 53) | type VersionMatchFailure struct
method Error (line 57) | func (vce VersionMatchFailure) Error() string {
method Pair (line 63) | func (vce VersionMatchFailure) Pair() (v Version, r Constraint) {
type MultiMatchFailure (line 69) | type MultiMatchFailure
method Error (line 71) | func (mmf MultiMatchFailure) Error() string {
FILE: vendor/github.com/Masterminds/semver/magic.go
type any (line 8) | type any struct
method String (line 15) | func (any) String() string {
method ImpliedCaretString (line 19) | func (any) ImpliedCaretString() string {
method Matches (line 25) | func (any) Matches(v Version) error {
method Intersect (line 34) | func (any) Intersect(c Constraint) Constraint {
method MatchesAny (line 41) | func (any) MatchesAny(c Constraint) bool {
method Union (line 48) | func (any) Union(c Constraint) Constraint {
method _private (line 52) | func (any) _private() {}
function Any (line 11) | func Any() Constraint {
type none (line 55) | type none struct
method String (line 62) | func (none) String() string {
method ImpliedCaretString (line 66) | func (none) ImpliedCaretString() string {
method Matches (line 72) | func (none) Matches(v Version) error {
method Intersect (line 80) | func (none) Intersect(Constraint) Constraint {
method Union (line 84) | func (none) Union(c Constraint) Constraint {
method MatchesAny (line 90) | func (none) MatchesAny(c Constraint) bool {
method _private (line 94) | func (none) _private() {}
function None (line 58) | func None() Constraint {
function IsNone (line 98) | func IsNone(c Constraint) bool {
function IsAny (line 104) | func IsAny(c Constraint) bool {
FILE: vendor/github.com/Masterminds/semver/parse.go
function rewriteRange (line 9) | func rewriteRange(i string) string {
function parseConstraint (line 23) | func parseConstraint(c string, cbd bool) (Constraint, error) {
function expandCaret (line 94) | func expandCaret(v Version) Constraint {
function expandTilde (line 111) | func expandTilde(v Version, wildMinor bool) Constraint {
function expandNeq (line 137) | func expandNeq(v Version, wildMinor, wildPatch bool) Constraint {
function expandGreater (line 177) | func expandGreater(v Version, wildMinor, wildPatch, eq bool) Constraint {
function expandLess (line 207) | func expandLess(v Version, wildMinor, wildPatch, eq bool) Constraint {
function isX (line 234) | func isX(x string) bool {
FILE: vendor/github.com/Masterminds/semver/range.go
type rangeConstraint (line 9) | type rangeConstraint struct
method Matches (line 15) | func (rc rangeConstraint) Matches(v Version) error {
method dup (line 73) | func (rc rangeConstraint) dup() rangeConstraint {
method minIsZero (line 92) | func (rc rangeConstraint) minIsZero() bool {
method maxIsInf (line 96) | func (rc rangeConstraint) maxIsInf() bool {
method Intersect (line 100) | func (rc rangeConstraint) Intersect(c Constraint) Constraint {
method Union (line 174) | func (rc rangeConstraint) Union(c Constraint) Constraint {
method isSupersetOf (line 367) | func (rc rangeConstraint) isSupersetOf(rc2 rangeConstraint) bool {
method String (line 383) | func (rc rangeConstraint) String() string {
method ImpliedCaretString (line 387) | func (rc rangeConstraint) ImpliedCaretString() string {
method toString (line 391) | func (rc rangeConstraint) toString(impliedCaret bool) string {
method MatchesAny (line 494) | func (rc rangeConstraint) MatchesAny(c Constraint) bool {
method _private (line 518) | func (rangeConstraint) _private() {}
method _real (line 519) | func (rangeConstraint) _real() {}
function areAdjacent (line 476) | func areAdjacent(c1, c2 Constraint) bool {
function dedupeExcls (line 501) | func dedupeExcls(ex1, ex2 []Version) []Version {
FILE: vendor/github.com/Masterminds/semver/union.go
type unionConstraint (line 5) | type unionConstraint
method Matches (line 7) | func (uc unionConstraint) Matches(v Version) error {
method Intersect (line 21) | func (uc unionConstraint) Intersect(c2 Constraint) Constraint {
method MatchesAny (line 53) | func (uc unionConstraint) MatchesAny(c Constraint) bool {
method Union (line 62) | func (uc unionConstraint) Union(c Constraint) Constraint {
method String (line 66) | func (uc unionConstraint) String() string {
method ImpliedCaretString (line 75) | func (uc unionConstraint) ImpliedCaretString() string {
method _private (line 84) | func (unionConstraint) _private() {}
type constraintList (line 86) | type constraintList
method Len (line 88) | func (cl constraintList) Len() int {
method Swap (line 92) | func (cl constraintList) Swap(i, j int) {
method Less (line 96) | func (cl constraintList) Less(i, j int) bool {
method Push (line 143) | func (cl *constraintList) Push(x interface{}) {
method Pop (line 147) | func (cl *constraintList) Pop() interface{} {
FILE: vendor/github.com/Masterminds/semver/version.go
type badVersionSegment (line 24) | type badVersionSegment struct
method Error (line 28) | func (b badVersionSegment) Error() string {
type vcache (line 38) | type vcache struct
constant SemVerRegex (line 44) | SemVerRegex string = `v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` +
type specialVersion (line 48) | type specialVersion
constant notSpecial (line 51) | notSpecial specialVersion = iota
constant zeroVersion (line 52) | zeroVersion
constant infiniteVersion (line 53) | infiniteVersion
type Version (line 57) | type Version struct
method String (line 159) | func (v Version) String() string {
method ImpliedCaretString (line 166) | func (v Version) ImpliedCaretString() string {
method toString (line 170) | func (v Version) toString(ic bool) string {
method Original (line 192) | func (v Version) Original() string {
method Major (line 197) | func (v *Version) Major() uint64 {
method Minor (line 202) | func (v *Version) Minor() uint64 {
method Patch (line 207) | func (v *Version) Patch() uint64 {
method Prerelease (line 212) | func (v Version) Prerelease() string {
method Metadata (line 217) | func (v Version) Metadata() string {
method LessThan (line 222) | func (v Version) LessThan(o Version) bool {
method GreaterThan (line 227) | func (v Version) GreaterThan(o Version) bool {
method Equal (line 234) | func (v Version) Equal(o Version) bool {
method Compare (line 243) | func (v Version) Compare(o Version) int {
method Matches (line 296) | func (v Version) Matches(v2 Version) error {
method MatchesAny (line 306) | func (v Version) MatchesAny(c Constraint) bool {
method Intersect (line 319) | func (v Version) Intersect(c Constraint) Constraint {
method Union (line 333) | func (v Version) Union(c Constraint) Constraint {
method _private (line 341) | func (Version) _private() {}
method _real (line 342) | func (Version) _real() {}
function init (line 65) | func init() {
function NewVersion (line 71) | func NewVersion(v string) (Version, error) {
function compareSegment (line 344) | func compareSegment(v, o uint64) int {
function comparePrerelease (line 355) | func comparePrerelease(v, o string) int {
function comparePrePart (line 398) | func comparePrePart(s, o string) int {
function numPartsEq (line 427) | func numPartsEq(v1, v2 Version) bool {
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/errors.go
type RemoteError (line 59) | type RemoteError struct
function NewRemoteError (line 64) | func NewRemoteError(msg string, err error, out string) error {
type LocalError (line 74) | type LocalError struct
function NewLocalError (line 79) | func NewLocalError(msg string, err error, out string) error {
type vcsError (line 88) | type vcsError struct
method Error (line 95) | func (e *vcsError) Error() string {
method Original (line 100) | func (e *vcsError) Original() error {
method Out (line 105) | func (e *vcsError) Out() string {
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/hg.go
function NewHgRepo (line 16) | func NewHgRepo(remote, local string) (*HgRepo, error) {
type HgRepo (line 62) | type HgRepo struct
method Vcs (line 67) | func (s HgRepo) Vcs() Type {
method Get (line 72) | func (s *HgRepo) Get() error {
method Init (line 81) | func (s *HgRepo) Init() error {
method Update (line 90) | func (s *HgRepo) Update() error {
method UpdateVersion (line 95) | func (s *HgRepo) UpdateVersion(version string) error {
method Version (line 112) | func (s *HgRepo) Version() (string, error) {
method Current (line 127) | func (s *HgRepo) Current() (string, error) {
method Date (line 161) | func (s *HgRepo) Date() (time.Time, error) {
method CheckLocal (line 178) | func (s *HgRepo) CheckLocal() bool {
method Branches (line 187) | func (s *HgRepo) Branches() ([]string, error) {
method Tags (line 197) | func (s *HgRepo) Tags() ([]string, error) {
method IsReference (line 208) | func (s *HgRepo) IsReference(r string) bool {
method IsDirty (line 215) | func (s *HgRepo) IsDirty() bool {
method CommitInfo (line 221) | func (s *HgRepo) CommitInfo(id string) (*CommitInfo, error) {
method TagsFromCommit (line 268) | func (s *HgRepo) TagsFromCommit(id string) ([]string, error) {
method Ping (line 302) | func (s *HgRepo) Ping() bool {
method ExportDir (line 308) | func (s *HgRepo) ExportDir(dir string) error {
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/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/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 133) | func detectVcsFromURL(vcsURL string) (Type, error) {
function checkBitbucket (line 237) | func checkBitbucket(i map[string]string, ul *url.URL) (Type, error) {
function checkURL (line 270) | func checkURL(i map[string]string, u *url.URL) (Type, error) {
function get (line 274) | func get(url string) ([]byte, error) {
function expand (line 295) | func expand(match map[string]string, s string) string {
function parseImportFromBody (line 302) | func parseImportFromBody(ur *url.URL, r io.ReadCloser) (tp Type, u strin...
function charsetReader (line 358) | func charsetReader(charset string, input io.Reader) (io.Reader, error) {
function attrValue (line 367) | func attrValue(attrs []xml.Attr, name string) string {
FILE: vendor/github.com/armon/go-radix/radix.go
type WalkFn (line 11) | type WalkFn
type leafNode (line 14) | type leafNode struct
type edge (line 20) | type edge struct
type node (line 25) | type node struct
method isLeaf (line 38) | func (n *node) isLeaf() bool {
method addEdge (line 42) | func (n *node) addEdge(e edge) {
method replaceEdge (line 47) | func (n *node) replaceEdge(e edge) {
method getEdge (line 59) | func (n *node) getEdge(label byte) *node {
method delEdge (line 70) | func (n *node) delEdge(label byte) {
method mergeChild (line 295) | func (n *node) mergeChild() {
type edges (line 82) | type edges
method Len (line 84) | func (e edges) Len() int {
method Less (line 88) | func (e edges) Less(i, j int) bool {
method Swap (line 92) | func (e edges) Swap(i, j int) {
method Sort (line 96) | func (e edges) Sort() {
type Tree (line 104) | type Tree struct
method Len (line 125) | func (t *Tree) Len() int {
method Insert (line 147) | func (t *Tree) Insert(s string, v interface{}) (interface{}, bool) {
method Delete (line 240) | func (t *Tree) Delete(s string) (interface{}, bool) {
method Get (line 305) | func (t *Tree) Get(s string) (interface{}, bool) {
method LongestPrefix (line 335) | func (t *Tree) LongestPrefix(s string) (string, interface{}, bool) {
method Minimum (line 370) | func (t *Tree) Minimum() (string, interface{}, bool) {
method Maximum (line 386) | func (t *Tree) Maximum() (string, interface{}, bool) {
method Walk (line 402) | func (t *Tree) Walk(fn WalkFn) {
method WalkPrefix (line 407) | func (t *Tree) WalkPrefix(prefix string, fn WalkFn) {
method WalkPath (line 442) | func (t *Tree) WalkPath(path string, fn WalkFn) {
method ToMap (line 489) | func (t *Tree) ToMap() map[string]interface{} {
function New (line 110) | func New() *Tree {
function NewFromMap (line 116) | func New
Condensed preview — 1088 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (7,628K chars).
[
{
"path": ".codeclimate.yml",
"chars": 712,
"preview": "version: \"2\"\nchecks:\n argument-count:\n enabled: false\n complex-logic:\n enabled: false\n file-lines:\n enabled:"
},
{
"path": ".gitattributes",
"chars": 80,
"preview": "# Prevent problems comparing golden files on Windows\n**/testdata/** text eol=lf\n"
},
{
"path": ".github/CODEOWNERS",
"chars": 891,
"preview": "# general\n* @sdboyer\n\n# init\n/cmd/dep/init* @carolynvs\n/cmd/dep/gopath_scanner* "
},
{
"path": ".github/ISSUE_TEMPLATE.md",
"chars": 583,
"preview": "<!--\n\nThanks for filing an issue! If this is a question or feature request, just delete\neverything here and write out th"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 546,
"preview": "<!--\nWork-in-progress PRs are welcome as a way to get early feedback - just prefix\nthe title with [WIP].\n\nAdd the change"
},
{
"path": ".gitignore",
"chars": 344,
"preview": "# dep project generated files to ignore\n# if you want to ignore files created by your editor/tools,\n# please consider "
},
{
"path": ".travis.yml",
"chars": 4673,
"preview": "language: go\nsudo: false\ndist: xenial\nnotifications:\n email: false\njobs:\n include:\n - stage: test\n go_import_p"
},
{
"path": "AUTHORS",
"chars": 173,
"preview": "# This source code refers to The Go Authors for copyright purposes.\n# The master list of authors is in the main Go distr"
},
{
"path": "CHANGELOG.md",
"chars": 12645,
"preview": "# v0.5.4\n\nReleased on June 13, 2019. We are [looking for\nsponsors!](https://github.com/golang/dep/issues/2165)\n\n- Fix an"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3231,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": "CONTRIBUTING.md",
"chars": 8911,
"preview": "# Contributing to `dep`\n\n`dep` is an open source project.\n\nIt is the work of hundreds of contributors. We appreciate you"
},
{
"path": "CONTRIBUTORS",
"chars": 170,
"preview": "# This source code was written by the Go contributors.\n# The master list of contributors is in the main Go distribution,"
},
{
"path": "Gopkg.toml",
"chars": 502,
"preview": "[[constraint]]\n name = \"github.com/Masterminds/semver\"\n branch = \"2.x\"\n\n[[constraint]]\n name = \"github.com/Mastermind"
},
{
"path": "LICENSE",
"chars": 1479,
"preview": "Copyright (c) 2014 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or with"
},
{
"path": "MAINTAINERS.md",
"chars": 454,
"preview": "\nGeneral maintainers:\n sam boyer (@sdboyer)\n\n* dep\n * `init` command: Carolyn Van Slyck (@carolynvs)\n * `ensure` co"
},
{
"path": "Makefile",
"chars": 786,
"preview": "SHELL := /bin/bash\nPLATFORM := $(shell go env GOOS)\nARCH := $(shell go env GOARCH)\nGOPATH := $(shell go env GOPATH)\nGOBI"
},
{
"path": "PATENTS",
"chars": 1303,
"preview": "Additional IP Rights Grant (Patents)\n\n\"This implementation\" means the copyrightable works distributed by\nGoogle as part "
},
{
"path": "README.md",
"chars": 2225,
"preview": "<p align=\"center\"><img src=\"docs/assets/DigbyShadows.png\" width=\"360\"></p>\n<p align=\"center\">\n <a href=\"https://travis-"
},
{
"path": "analyzer.go",
"chars": 1305,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "analyzer_notwindows_test.go",
"chars": 428,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "analyzer_test.go",
"chars": 2786,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "analyzer_windows_test.go",
"chars": 979,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "appveyor.yml",
"chars": 789,
"preview": "version: \"{build}\"\n\n# Source Config\n\nclone_folder: c:\\gopath\\src\\github.com\\golang\\dep\n\n# Build host\n\nenvironment:\n GOP"
},
{
"path": "cmd/dep/check.go",
"chars": 7771,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/dep_test.go",
"chars": 1328,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/doc.go",
"chars": 5235,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/ensure.go",
"chars": 27738,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/ensure_test.go",
"chars": 6544,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/failures.go",
"chars": 618,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/feature_flags.go",
"chars": 786,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/gopath_scanner.go",
"chars": 11502,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/gopath_scanner_test.go",
"chars": 4966,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/graphviz.go",
"chars": 7752,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/graphviz_test.go",
"chars": 8486,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/init.go",
"chars": 7896,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/integration_test.go",
"chars": 5982,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/main.go",
"chars": 11361,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/mkdoc.sh",
"chars": 270,
"preview": "#!/bin/bash\n# Copyright 2017 The Go Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style\n#"
},
{
"path": "cmd/dep/prune.go",
"chars": 5819,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/root_analyzer.go",
"chars": 5892,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/status.go",
"chars": 39962,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/status_test.go",
"chars": 31747,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/cachedir/Gopkg.toml",
"chars": 74,
"preview": "\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n"
},
{
"path": "cmd/dep/testdata/cachedir/main.go",
"chars": 234,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/graphviz/case1.dot",
"chars": 210,
"preview": "digraph {\n\tnode [shape=box];\n\t4106060478 [label=\"project\"];\n\t2851307223 [label=\"foo\\nmaster\"];\n\t1991736602 [label=\"bar\\n"
},
{
"path": "cmd/dep/testdata/graphviz/case2.dot",
"chars": 62,
"preview": "digraph {\n\tnode [shape=box];\n\t4106060478 [label=\"project\"];\n}\n"
},
{
"path": "cmd/dep/testdata/graphviz/empty.dot",
"chars": 31,
"preview": "digraph {\n\tnode [shape=box];\n}\n"
},
{
"path": "cmd/dep/testdata/graphviz/subgraph1.dot",
"chars": 619,
"preview": "digraph {\n\tnode [shape=box];\n\tcompound=true;\n\tedge [minlen=2];\n\t552838292 [label=\"ProjectA/pkgX\"];\n\t569615911 [label=\"Pr"
},
{
"path": "cmd/dep/testdata/graphviz/subgraph2.dot",
"chars": 623,
"preview": "digraph {\n\tnode [shape=box];\n\tcompound=true;\n\tedge [minlen=2];\n\t2062426895 [label=\"ProjectB/pkgX\"];\n\t2045649276 [label=\""
},
{
"path": "cmd/dep/testdata/graphviz/subgraph3.dot",
"chars": 681,
"preview": "digraph {\n\tnode [shape=box];\n\tcompound=true;\n\tedge [minlen=2];\n\t1459457741 [label=\"ProjectA\"];\n\t2062426895 [label=\"Proje"
},
{
"path": "cmd/dep/testdata/graphviz/subgraph4.dot",
"chars": 363,
"preview": "digraph {\n\tnode [shape=box];\n\tcompound=true;\n\tedge [minlen=2];\n\t2062426895 [label=\"ProjectB/pkgX\"];\n\t2045649276 [label=\""
},
{
"path": "cmd/dep/testdata/harness_tests/README.md",
"chars": 3715,
"preview": "# golang/dep Integration Tests\n\nThe `dep` integration tests use a consistent directory structure under `testdata`\nto set"
},
{
"path": "cmd/dep/testdata/harness_tests/check/excess_inputs/final/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/excess_inputs/initial/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/excess_inputs/initial/main.go",
"chars": 237,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/excess_inputs/stdout.txt",
"chars": 123,
"preview": "# Gopkg.lock is out of sync:\ngithub.com/sdboyer/deptest: in Gopkg.lock's input-imports, but neither imported nor require"
},
{
"path": "cmd/dep/testdata/harness_tests/check/excess_inputs/testcase.json",
"chars": 83,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": []\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_mismatch/final/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_mismatch/initial/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_mismatch/initial/main.go",
"chars": 234,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_mismatch/initial/vendor/github.com/sdboyer/deptest/deptest.go",
"chars": 30,
"preview": "package deptest\n\ntype Foo int\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_mismatch/stdout.txt",
"chars": 109,
"preview": "# vendor is out of sync:\ngithub.com/sdboyer/deptest: hash of vendored tree not equal to digest in Gopkg.lock\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_mismatch/testcase.json",
"chars": 119,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": [\n \"github.com/sdboyer/deptest\"\n ]\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_version_mismatch/final/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_version_mismatch/initial/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_version_mismatch/initial/main.go",
"chars": 234,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_version_mismatch/initial/vendor/github.com/sdboyer/deptest/deptest.go",
"chars": 30,
"preview": "package deptest\n\ntype Foo int\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_version_mismatch/stdout.txt",
"chars": 93,
"preview": "# vendor is out of sync:\ngithub.com/sdboyer/deptest: hash algorithm mismatch, want version 1\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/hash_version_mismatch/testcase.json",
"chars": 119,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": [\n \"github.com/sdboyer/deptest\"\n ]\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/missing_and_excess/final/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/missing_and_excess/initial/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/missing_and_excess/initial/main.go",
"chars": 237,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/missing_and_excess/stdout.txt",
"chars": 220,
"preview": "# Gopkg.lock is out of sync:\ngithub.com/sdboyer/deptestdos: imported or required, but missing from Gopkg.lock's input-im"
},
{
"path": "cmd/dep/testdata/harness_tests/check/missing_and_excess/testcase.json",
"chars": 83,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": []\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/missing_inputs/final/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/missing_inputs/initial/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/missing_inputs/initial/main.go",
"chars": 237,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/missing_inputs/stdout.txt",
"chars": 127,
"preview": "# Gopkg.lock is out of sync:\ngithub.com/sdboyer/deptestdos: imported or required, but missing from Gopkg.lock's input-im"
},
{
"path": "cmd/dep/testdata/harness_tests/check/missing_inputs/testcase.json",
"chars": 83,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": []\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_mismatch/final/Gopkg.toml",
"chars": 42,
"preview": "noverify = [\"github.com/sdboyer/deptest\"]\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_mismatch/initial/Gopkg.toml",
"chars": 42,
"preview": "noverify = [\"github.com/sdboyer/deptest\"]\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_mismatch/initial/main.go",
"chars": 234,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_mismatch/initial/vendor/github.com/sdboyer/deptest/deptest.go",
"chars": 30,
"preview": "package deptest\n\ntype Foo int\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_mismatch/stdout.txt",
"chars": 143,
"preview": "# out of sync, but ignored, due to noverify in Gopkg.toml:\ngithub.com/sdboyer/deptest: hash of vendored tree not equal t"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_mismatch/testcase.json",
"chars": 96,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"vendor-final\": [\n \"github.com/sdboyer/deptest\"\n ]\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_version_mismatch/final/Gopkg.toml",
"chars": 42,
"preview": "noverify = [\"github.com/sdboyer/deptest\"]\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_version_mismatch/initial/Gopkg.toml",
"chars": 42,
"preview": "noverify = [\"github.com/sdboyer/deptest\"]\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_version_mismatch/initial/main.go",
"chars": 234,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_version_mismatch/initial/vendor/github.com/sdboyer/deptest/deptest.go",
"chars": 30,
"preview": "package deptest\n\ntype Foo int\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_version_mismatch/stdout.txt",
"chars": 127,
"preview": "# out of sync, but ignored, due to noverify in Gopkg.toml:\ngithub.com/sdboyer/deptest: hash algorithm mismatch, want ver"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/hash_version_mismatch/testcase.json",
"chars": 96,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"vendor-final\": [\n \"github.com/sdboyer/deptest\"\n ]\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/missing_and_excess/final/Gopkg.toml",
"chars": 42,
"preview": "noverify = [\"github.com/sdboyer/deptest\"]\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/missing_and_excess/initial/Gopkg.toml",
"chars": 42,
"preview": "noverify = [\"github.com/sdboyer/deptest\"]\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/missing_and_excess/initial/main.go",
"chars": 237,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/missing_and_excess/stdout.txt",
"chars": 220,
"preview": "# Gopkg.lock is out of sync:\ngithub.com/sdboyer/deptestdos: imported or required, but missing from Gopkg.lock's input-im"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/missing_and_excess/testcase.json",
"chars": 83,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": []\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/unmet_constraint/final/Gopkg.toml",
"chars": 119,
"preview": "noverify = [\"github.com/sdboyer/deptestdos\"]\n\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n branch = \"master\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/unmet_constraint/initial/Gopkg.toml",
"chars": 119,
"preview": "noverify = [\"github.com/sdboyer/deptestdos\"]\n\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n branch = \"master\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/unmet_constraint/initial/main.go",
"chars": 234,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/unmet_constraint/stdout.txt",
"chars": 171,
"preview": "# Gopkg.lock is out of sync:\ngithub.com/sdboyer/deptest@v1.0.0: not allowed by constraint master\n\n# vendor is out of syn"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/unmet_constraint/testcase.json",
"chars": 83,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": []\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/unmet_override/final/Gopkg.toml",
"chars": 114,
"preview": "noverify = [\"github.com/sdboyer/deptest\"]\n\n[[override]]\n name = \"github.com/sdboyer/deptest\"\n branch = \"master\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/unmet_override/initial/Gopkg.toml",
"chars": 114,
"preview": "noverify = [\"github.com/sdboyer/deptest\"]\n\n[[override]]\n name = \"github.com/sdboyer/deptest\"\n branch = \"master\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/unmet_override/initial/main.go",
"chars": 234,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/unmet_override/stdout.txt",
"chars": 169,
"preview": "# Gopkg.lock is out of sync:\ngithub.com/sdboyer/deptest@v1.0.0: not allowed by override master\n\n# vendor is out of sync:"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/unmet_override/testcase.json",
"chars": 83,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": []\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/vendororphans/final/Gopkg.toml",
"chars": 42,
"preview": "noverify = [\"github.com/sdboyer/deptest\"]\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/vendororphans/initial/Gopkg.toml",
"chars": 42,
"preview": "noverify = [\"github.com/sdboyer/deptest\"]\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/vendororphans/initial/main.go",
"chars": 234,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/vendororphans/initial/vendor/foo",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/vendororphans/initial/vendor/github.com/sdboyer/deptest/deptest.go",
"chars": 30,
"preview": "package deptest\n\ntype Foo int\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/vendororphans/initial/vendor/orphdir/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/vendororphans/stdout.txt",
"chars": 68,
"preview": "# vendor is out of sync:\nfoo: orphaned file\norphdir: unused project\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/noverify/vendororphans/testcase.json",
"chars": 119,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": [\n \"github.com/sdboyer/deptest\"\n ]\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/pruneopts_changed/final/Gopkg.toml",
"chars": 126,
"preview": "\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n\n[prune]\n go-tests = true\n unused-packages ="
},
{
"path": "cmd/dep/testdata/harness_tests/check/pruneopts_changed/initial/Gopkg.toml",
"chars": 126,
"preview": "\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n\n[prune]\n go-tests = true\n unused-packages ="
},
{
"path": "cmd/dep/testdata/harness_tests/check/pruneopts_changed/initial/main.go",
"chars": 288,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/pruneopts_changed/initial/vendor/github.com/sdboyer/deptest/deptest.go",
"chars": 30,
"preview": "package deptest\n\ntype Foo int\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/pruneopts_changed/stdout.txt",
"chars": 89,
"preview": "# Gopkg.lock is out of sync:\ngithub.com/sdboyer/deptest: prune options changed ( -> UT)\n\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/pruneopts_changed/testcase.json",
"chars": 119,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": [\n \"github.com/sdboyer/deptest\"\n ]\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/unmet_constraint/final/Gopkg.toml",
"chars": 73,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n branch = \"master\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/unmet_constraint/initial/Gopkg.toml",
"chars": 73,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n branch = \"master\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/unmet_constraint/initial/main.go",
"chars": 234,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/unmet_constraint/stdout.txt",
"chars": 171,
"preview": "# Gopkg.lock is out of sync:\ngithub.com/sdboyer/deptest@v1.0.0: not allowed by constraint master\n\n# vendor is out of syn"
},
{
"path": "cmd/dep/testdata/harness_tests/check/unmet_constraint/testcase.json",
"chars": 83,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": []\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/unmet_override/final/Gopkg.toml",
"chars": 71,
"preview": "[[override]]\n name = \"github.com/sdboyer/deptest\"\n branch = \"master\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/unmet_override/initial/Gopkg.toml",
"chars": 71,
"preview": "[[override]]\n name = \"github.com/sdboyer/deptest\"\n branch = \"master\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/unmet_override/initial/main.go",
"chars": 234,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/unmet_override/stdout.txt",
"chars": 169,
"preview": "# Gopkg.lock is out of sync:\ngithub.com/sdboyer/deptest@v1.0.0: not allowed by override master\n\n# vendor is out of sync:"
},
{
"path": "cmd/dep/testdata/harness_tests/check/unmet_override/testcase.json",
"chars": 83,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": []\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/vendororphans/final/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/vendororphans/initial/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/vendororphans/initial/main.go",
"chars": 234,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/check/vendororphans/initial/vendor/foo",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/vendororphans/initial/vendor/github.com/sdboyer/deptest/deptest.go",
"chars": 30,
"preview": "package deptest\n\ntype Foo int\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/vendororphans/initial/vendor/orphdir/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/check/vendororphans/stdout.txt",
"chars": 68,
"preview": "# vendor is out of sync:\nfoo: orphaned file\norphdir: unused project\n"
},
{
"path": "cmd/dep/testdata/harness_tests/check/vendororphans/testcase.json",
"chars": 119,
"preview": "{\n \"commands\": [\n [\"check\"]\n ],\n \"should-fail\": true,\n \"vendor-final\": [\n \"github.com/sdboyer/deptest\"\n ]\n}\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new/final/Gopkg.toml",
"chars": 204,
"preview": "\n[[constraint]]\n branch = \"master\"\n name = \"github.com/sdboyer/deptesttres\"\n\n[prune]\n go-tests = true\n unused-packag"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new/initial/main.go",
"chars": 260,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new/testcase.json",
"chars": 207,
"preview": "{\n \"commands\": [\n [\"init\", \"-no-examples\"],\n [\"ensure\", \"-add\", \"github.com/sdboyer/deptest\"]\n ],\n \"vendor-fina"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new-double/final/Gopkg.toml",
"chars": 204,
"preview": "\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n\n[prune]\n go-tests = true\n unused-packages ="
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new-double/initial/main.go",
"chars": 252,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new-double/testcase.json",
"chars": 250,
"preview": "{\n \"commands\": [\n [\"init\", \"-no-examples\"],\n [\"ensure\", \"-add\", \"github.com/sdboyer/deptesttres\", \"github.com/sdb"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new-double-spec/final/Gopkg.toml",
"chars": 204,
"preview": "\n[[constraint]]\n branch = \"master\"\n name = \"github.com/sdboyer/deptesttres\"\n\n[prune]\n go-tests = true\n unused-packag"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new-double-spec/initial/main.go",
"chars": 260,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new-double-spec/testcase.json",
"chars": 244,
"preview": "{\n \"commands\": [\n [\"init\", \"-no-examples\"],\n [\"ensure\", \"-add\", \"github.com/sdboyer/deptest\", \"github.com/sdboyer"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new-spec/final/Gopkg.toml",
"chars": 204,
"preview": "\n[[constraint]]\n branch = \"master\"\n name = \"github.com/sdboyer/deptesttres\"\n\n[prune]\n go-tests = true\n unused-packag"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new-spec/initial/main.go",
"chars": 260,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/all-new-spec/testcase.json",
"chars": 214,
"preview": "{\n \"commands\": [\n [\"init\", \"-no-examples\"],\n [\"ensure\", \"-add\", \"github.com/sdboyer/deptest@v0.8.1\"]\n ],\n \"vend"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/desync/final/Gopkg.toml",
"chars": 151,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"~0.8.0\"\n[[constraint]]\n branch = \"master\"\n name = \"g"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/desync/final/main.go",
"chars": 350,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/desync/initial/Gopkg.toml",
"chars": 73,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"~0.8.0\""
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/desync/initial/main.go",
"chars": 409,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/desync/stdout.txt",
"chars": 20,
"preview": "Fetching sources...\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/desync/testcase.json",
"chars": 227,
"preview": "{\n \"commands\": [\n [\"ensure\", \"-add\", \"github.com/sdboyer/deptesttres@master\"]\n ],\n \"vendor-final\": [\n \"github"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/double-diff-spec/final/Gopkg.toml",
"chars": 130,
"preview": "\n[[constraint]]\n branch = \"master\"\n name = \"github.com/sdboyer/deptesttres\"\n\n[prune]\n go-tests = true\n unused-packag"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/double-diff-spec/initial/main.go",
"chars": 260,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/double-diff-spec/testcase.json",
"chars": 352,
"preview": "{\n \"commands\": [\n [\"init\", \"-no-examples\"],\n [\"ensure\", \"-add\", \"github.com/sdboyer/deptest@0.8.1\", \"github.com/s"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/exists/final/Gopkg.toml",
"chars": 73,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/exists/initial/Gopkg.toml",
"chars": 73,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/exists/initial/main.go",
"chars": 260,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/exists/testcase.json",
"chars": 219,
"preview": "{\n \"commands\": [\n [\"ensure\", \"-add\", \"github.com/sdboyer/deptest\"]\n ],\n \"error-expected\": \"nothing to -add, github"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/exists-manifest/final/Gopkg.toml",
"chars": 151,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptesttres\"\n branch = \"master\"\n\n[[constraint]]\n name = \"github.com/sdboye"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/exists-manifest/initial/Gopkg.toml",
"chars": 151,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptesttres\"\n branch = \"master\"\n\n[[constraint]]\n name = \"github.com/sdboye"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/exists-manifest/initial/main.go",
"chars": 260,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/exists-manifest/testcase.json",
"chars": 208,
"preview": "{\n \"commands\": [\n [\"ensure\", \"-add\", \"github.com/sdboyer/deptest@1.0.0\"]\n ],\n \"error-expected\": \"Gopkg.toml alread"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/noarg/final/Gopkg.toml",
"chars": 73,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"~0.8.0\""
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/noarg/final/main.go",
"chars": 350,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/noarg/initial/Gopkg.toml",
"chars": 73,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"~0.8.0\""
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/noarg/initial/main.go",
"chars": 350,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/noarg/testcase.json",
"chars": 123,
"preview": "{\n \"commands\": [\n [\"ensure\", \"-add\"]\n ],\n \"error-expected\": \"must specify at least one project or package to -add\""
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/self-add/case1/final/Gopkg.toml",
"chars": 73,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/self-add/case1/initial/Gopkg.toml",
"chars": 73,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/self-add/case1/initial/main.go",
"chars": 260,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/self-add/case1/testcase.json",
"chars": 137,
"preview": "{\n \"commands\": [\n [\"ensure\", \"-add\", \"github.com/golang/notexist\"]\n ],\n \"error-expected\": \"cannot add current proj"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/self-add/case2/final/Gopkg.toml",
"chars": 52,
"preview": "\n[prune]\n go-tests = true\n unused-packages = true\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/self-add/case2/initial/main.go",
"chars": 189,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/errs/self-add/case2/testcase.json",
"chars": 167,
"preview": "{\n \"commands\": [\n [\"init\", \"-no-examples\"],\n [\"ensure\", \"-add\", \"github.com/golang/notexist\"]\n ],\n \"error-expec"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/exists-imports/final/Gopkg.toml",
"chars": 78,
"preview": "\n[[constraint]]\n branch = \"master\"\n name = \"github.com/sdboyer/deptesttres\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/exists-imports/initial/Gopkg.toml",
"chars": 0,
"preview": ""
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/exists-imports/initial/main.go",
"chars": 260,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/exists-imports/testcase.json",
"chars": 152,
"preview": "{\n \"commands\": [\n [\"ensure\", \"-add\", \"github.com/sdboyer/deptesttres@master\"]\n ],\n \"vendor-final\": [\n \"github"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/exists-manifest-constraint/final/Gopkg.toml",
"chars": 151,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptesttres\"\n branch = \"master\"\n\n[[constraint]]\n name = \"github.com/sdboye"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/exists-manifest-constraint/initial/Gopkg.toml",
"chars": 151,
"preview": "[[constraint]]\n name = \"github.com/sdboyer/deptesttres\"\n branch = \"master\"\n\n[[constraint]]\n name = \"github.com/sdboye"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/exists-manifest-constraint/initial/main.go",
"chars": 260,
"preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/add/exists-manifest-constraint/testcase.json",
"chars": 177,
"preview": "{\n \"commands\": [\n [\"ensure\", \"-add\", \"github.com/sdboyer/deptest\"]\n ],\n \"vendor-final\": [\n \"github.com/sdboye"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/errs/lockless-vendoronly/final/Gopkg.toml",
"chars": 74,
"preview": "\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/errs/lockless-vendoronly/final/main.go",
"chars": 234,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/errs/lockless-vendoronly/initial/Gopkg.toml",
"chars": 74,
"preview": "\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/errs/lockless-vendoronly/initial/main.go",
"chars": 234,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/errs/lockless-vendoronly/testcase.json",
"chars": 130,
"preview": "{\n \"commands\": [\n [\"ensure\", \"-vendor-only\"]\n ],\n \"error-expected\": \"no Gopkg.lock exists from which to populate v"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/errs/specargs/final/Gopkg.toml",
"chars": 74,
"preview": "\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/errs/specargs/initial/Gopkg.toml",
"chars": 74,
"preview": "\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/errs/specargs/initial/main.go",
"chars": 234,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/errs/specargs/testcase.json",
"chars": 138,
"preview": "{\n \"commands\": [\n [\"ensure\", \"foobar.com/baz\"]\n ],\n \"error-expected\": \"dep ensure only takes spec arguments with -"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/hasheq/final/Gopkg.toml",
"chars": 74,
"preview": "\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/hasheq/initial/Gopkg.toml",
"chars": 74,
"preview": "\n[[constraint]]\n name = \"github.com/sdboyer/deptest\"\n version = \"1.0.0\"\n"
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/hasheq/initial/main.go",
"chars": 234,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/dep/testdata/harness_tests/ensure/default/hasheq/testcase.json",
"chars": 97,
"preview": "{\n \"commands\": [\n [\"ensure\"]\n ],\n \"vendor-final\": [\n \"github.com/sdboyer/deptest\"\n ]\n}\n"
}
]
// ... and 888 more files (download for full content)
About this extraction
This page contains the full source code of the golang/dep GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1088 files (6.7 MB), approximately 1.8M tokens, and a symbol index with 69107 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.