Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit c20daf3

Browse files
authored
Merge pull request #842 from darkowlzz/faq-resolve-dep-gopath
FAQ: resolving dependencies from GOPATH
2 parents b353631 + 22bd427 commit c20daf3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/FAQ.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Summarize the question and quote the reply, linking back to the original comment
2525
* [Why is `dep` slow?](#why-is-dep-slow)
2626
* [How does `dep` handle symbolic links?](#how-does-dep-handle-symbolic-links)
2727
* [Does `dep` support relative imports?](#does-dep-support-relative-imports)
28+
* [How do I make `dep` resolve dependencies from my `GOPATH`?](#how-do-i-make-dep-resolve-dependencies-from-my-gopath)
2829

2930
## Best Practices
3031
* [Should I commit my vendor directory?](#should-i-commit-my-vendor-directory)
@@ -287,6 +288,13 @@ No.
287288
288289
For a refresher on Go's recommended workspace organization, see the ["How To Write Go Code"](https://golang.org/doc/code.html) article in the Go docs. Organizing your code this way gives you a unique import path for every package.
289290

291+
## How do I make `dep` resolve dependencies from my `GOPATH`?
292+
293+
`dep init` provides an option to scan the `GOPATH` for dependencies by doing
294+
`dep init -gopath`, which falls back to network mode when the packages are not
295+
found in `GOPATH`. `dep ensure` doesn't work with projects in `GOPATH`.
296+
297+
290298
## Best Practices
291299
### Should I commit my vendor directory?
292300

0 commit comments

Comments
 (0)