@@ -41,10 +41,9 @@ To start managing dependencies using dep, run the following from your project ro
41
41
42
42
``` sh
43
43
$ dep init
44
- $ dep ensure -update
45
44
```
46
45
47
- ` dep init ` will do the following:
46
+ This does the following:
48
47
49
48
1 . Look for [ existing dependency management files] ( docs/FAQ.md#what-external-tools-are-supported ) to convert
50
49
1 . Check if your dependencies use dep
@@ -57,10 +56,11 @@ $ dep ensure -update
57
56
58
57
## Usage
59
58
60
- There is one main subcommand you will use: ` dep ensure ` . ` ensure ` synchronizes
61
- your dependencies in ` vendor/ ` to make sure they match what's in your ` import ` s
62
- and ` Gopkg.toml ` . ` dep ensure ` is safe to run early and often. See the help text
63
- for more detailed usage instructions.
59
+ There is one main subcommand you will use: ` dep ensure ` . ` ensure ` first makes
60
+ sure ` Gopkg.lock ` is consistent with your ` import ` s and ` Gopkg.toml ` , and then
61
+ that ` vendor/ ` is populated with exactly what's described in ` Gopkg.lock ` . `dep
62
+ ensure` is safe to run early and often. See the help text for more detailed
63
+ usage instructions.
64
64
65
65
``` sh
66
66
$ dep help ensure
@@ -70,6 +70,8 @@ $ dep help ensure
70
70
71
71
(if your ` vendor/ ` directory isn't [ checked in with your code] ( ](docs/FAQ.md#should-i-commit-my-vendor-directory) ) )
72
72
73
+ <!-- may change with https://github.com/golang/dep/pull/489 -->
74
+
73
75
``` sh
74
76
$ dep ensure
75
77
```
@@ -80,8 +82,8 @@ matches the constraints from the manifest. If the dependency is missing from
80
82
81
83
### Adding a dependency
82
84
83
- 1 . Add the ` import ` in your source code file(s).
84
- 1 . Download via dep .
85
+ 1 . ` import ` the package in your ` *.go ` source code file(s).
86
+ 1 . Run the following command to update your ` Gopkg.lock ` and populate ` vendor/ ` with the new dependency .
85
87
86
88
``` sh
87
89
$ dep ensure
@@ -156,7 +158,11 @@ Don't run `dep ensure` until you're done. `dep ensure` will reinstall the
156
158
dependency into `vendor/` based on your manifest, as if you were installing from
157
159
scratch.
158
160
159
- To test out code that is pushed, see [changing dependencies](#changing-dependencies).
161
+ This solution works for short-term use, but for something long-term, take a look
162
+ at [virtualgo](https://github.com/GetStream/vg).
163
+
164
+ To test out code that has been pushed as a new version, or to a branch or fork,
165
+ see [changing dependencies](#changing-dependencies).
160
166
161
167
## Feedback
162
168
0 commit comments