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

Commit f845be7

Browse files
committed
Change order - default first and then pinning version
1 parent 2dda8af commit f845be7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

FAQ.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,6 @@ in the manifest. Transitive dependencies are unaffected.
9090

9191
Use an `overrides` entry for transitive dependencies.
9292

93-
To pin a version of direct dependency in manifest, prefix the version with `=`.
94-
For example:
95-
```
96-
[[constraint]]
97-
name = "github.com/pkg/errors"
98-
version = "=0.8.0"
99-
```
100-
10193
By default, when you specify a version without an operator, such as `~` or `=`,
10294
`dep` automatically adds a caret operator, `^`. The caret operator pins the
10395
left-most non-zero digit in the version. For example:
@@ -107,6 +99,14 @@ left-most non-zero digit in the version. For example:
10799
^0.0.3 means 0.0.3 <= X < 0.0.4
108100
```
109101

102+
To pin a version of direct dependency in manifest, prefix the version with `=`.
103+
For example:
104+
```
105+
[[constraint]]
106+
name = "github.com/pkg/errors"
107+
version = "=0.8.0"
108+
```
109+
110110

111111
## How do I constrain a transitive dependency's version?
112112
First, if you're wondering about this because you're trying to keep the version

0 commit comments

Comments
 (0)