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

Commit 32ace93

Browse files
authored
Merge pull request #739 from ibrasho-forks/update-FAQ
Update the FAQ to use constraint instead of dependencies (reflect #538)
2 parents d252483 + f0b6d09 commit 32ace93

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

FAQ.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Summarize the question and quote the reply, linking back to the original comment
3535
## When should I use `constraint`, `override`, `required`, or `ignored` in `Gopkg.toml`?
3636

3737
* Use `constraint` to constrain a [direct dependency](#what-is-a-direct-or-transitive-dependency) to a specific branch, version range, revision, or specify an alternate source such as a fork.
38-
* Use `override` to constrain a [transitive dependency](#what-is-a-direct-or-transitive-dependency). See [How do I constrain a transitive dependency's version?](#how-do-i-constrain-a-transitive-dependencys-version) for more details on how overrides differ from dependencies. Overrides should be used cautiously, sparingly, and temporarily.
38+
* Use `override` to constrain a [transitive dependency](#what-is-a-direct-or-transitive-dependency). See [How do I constrain a transitive dependency's version?](#how-do-i-constrain-a-transitive-dependencys-version) for more details on how overrides differ from constraints. Overrides should be used cautiously, sparingly, and temporarily.
3939
* Use `required` to explicitly add a dependency that is not imported directly or transitively, for example a development package used for code generation.
4040
* Use `ignored` to ignore a package and any of that package's unique dependencies.
4141

@@ -88,7 +88,7 @@ Here are some suggestions for when you could use `dep` or `go get`:
8888
Only your project's directly imported dependencies are affected by a `constraint` entry
8989
in the manifest. Transitive dependencies are unaffected.
9090

91-
Use an `overrides` entry for transitive dependencies.
91+
Use an `override` entry for transitive dependencies.
9292

9393
By default, when you specify a version without an operator, such as `~` or `=`,
9494
`dep` automatically adds a caret operator, `^`. The caret operator pins the
@@ -122,10 +122,10 @@ dependency, you have a couple of options:
122122
2. Use an override.
123123

124124
Overrides are a sledgehammer, and should only be used as a last resort. While
125-
dependencies and overrides are declared in the same way in `Gopkg.toml`, they
125+
constraints and overrides are declared in the same way in `Gopkg.toml`, they
126126
behave differently:
127127

128-
* Dependencies:
128+
* Constraints:
129129
1. Can be declared by any project's manifest, yours or a dependency
130130
2. Apply only to direct dependencies of the project declaring the constraint
131131
3. Must not conflict with the `constraint` entries declared in any other project's manifest

0 commit comments

Comments
 (0)